The live ClickHouse Cloud OpenAPI spec has operations or schemas that the
Rust library (client.rs / models.rs) does not cover yet.
- Live spec:
https://api.clickhouse.cloud/v1
- Client:
crates/clickhouse-cloud-api/src/client.rs
- Models:
crates/clickhouse-cloud-api/src/models.rs
- Beta metadata:
crates/clickhouse-cloud-api/src/meta.rs
Summary
| Change |
Count |
| Missing client methods |
0 |
| Extra client methods (not in spec) |
0 |
| Missing model types |
1 |
| Missing struct fields |
2 |
| Field optionality mismatches |
0 |
| Beta status changes |
0 |
| Stale snapshot changes |
1 |
Missing Model Types
The live spec defines these schemas but models.rs has no matching
pub struct, pub enum, or pub type.
CustomPrivateDnsMapping (spec name: CustomPrivateDnsMapping)
Schema JSON
{
"properties": {
"privateDnsName": {
"description": "Custom private DNS name managed by the DNS controller. No Route53 hosted zone is required.",
"type": "string",
"example": "my-service.example.com"
}
}
}
Missing Struct Fields
These properties exist in the OpenAPI spec but have no corresponding
field in the Rust struct. API response data for these fields is silently
dropped during deserialization.
| Schema |
Field |
CreateReversePrivateEndpoint |
customPrivateDnsMappings |
ReversePrivateEndpoint |
customPrivateDnsMappings |
Stale Snapshot
The committed clickhouse_cloud_openapi.json is behind the live spec.
Tests that run against the snapshot may pass even though the library is
missing coverage for new endpoints or schemas.
New schemas in live spec (not in snapshot):
Implementation Guide
- Update the checked-in spec:
curl -s https://api.clickhouse.cloud/v1 -o crates/clickhouse-cloud-api/clickhouse_cloud_openapi.json
- Add missing types to
crates/clickhouse-cloud-api/src/models.rs
- Use
#[serde(rename_all = "camelCase")] on structs
- Use
#[serde(skip_serializing_if = "Option::is_none")] for optional fields
- Enums should derive
Default and include an #[serde(other)] Unknown variant
- Add missing methods to
crates/clickhouse-cloud-api/src/client.rs
- Fix any field optionality mismatches by hand-editing
models.rs
(flip T ↔ Option<T> and the matching skip_serializing_if attribute).
- Verify:
cargo test -p clickhouse-cloud-api
The live ClickHouse Cloud OpenAPI spec has operations or schemas that the
Rust library (
client.rs/models.rs) does not cover yet.https://api.clickhouse.cloud/v1crates/clickhouse-cloud-api/src/client.rscrates/clickhouse-cloud-api/src/models.rscrates/clickhouse-cloud-api/src/meta.rsSummary
Missing Model Types
The live spec defines these schemas but
models.rshas no matchingpub struct,pub enum, orpub type.CustomPrivateDnsMapping(spec name:CustomPrivateDnsMapping)Schema JSON
{ "properties": { "privateDnsName": { "description": "Custom private DNS name managed by the DNS controller. No Route53 hosted zone is required.", "type": "string", "example": "my-service.example.com" } } }Missing Struct Fields
These properties exist in the OpenAPI spec but have no corresponding
field in the Rust struct. API response data for these fields is silently
dropped during deserialization.
CreateReversePrivateEndpointcustomPrivateDnsMappingsReversePrivateEndpointcustomPrivateDnsMappingsStale Snapshot
The committed
clickhouse_cloud_openapi.jsonis behind the live spec.Tests that run against the snapshot may pass even though the library is
missing coverage for new endpoints or schemas.
New schemas in live spec (not in snapshot):
CustomPrivateDnsMappingImplementation Guide
crates/clickhouse-cloud-api/src/models.rs#[serde(rename_all = "camelCase")]on structs#[serde(skip_serializing_if = "Option::is_none")]for optional fieldsDefaultand include an#[serde(other)]Unknownvariantcrates/clickhouse-cloud-api/src/client.rsmodels.rs(flip
T↔Option<T>and the matchingskip_serializing_ifattribute).cargo test -p clickhouse-cloud-api