Skip to content

OpenAPI drift: 21 gaps between live spec and library #287

Description

@github-actions

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 0
Missing struct fields 21
Extra struct fields (not in spec) 0
Field optionality mismatches 0
Beta status changes 0
Deprecated output field changes 0
Stale snapshot changes 0

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
ClickPipeObjectStorageSource skipInitialLoad
ClickPipeObjectStorageSource startAfter
ClickPipePatchObjectStorageSource skipInitialLoad
ClickPipePatchObjectStorageSource startAfter
ClickPipePostObjectStorageSource skipInitialLoad
ClickPipePostObjectStorageSource startAfter
PgConfig autovacuum_analyze_scale_factor
PgConfig autovacuum_max_workers
PgConfig autovacuum_naptime
PgConfig autovacuum_vacuum_cost_delay
PgConfig autovacuum_vacuum_cost_limit
PgConfig autovacuum_vacuum_insert_scale_factor
PgConfig autovacuum_vacuum_scale_factor
PgConfig autovacuum_work_mem
ScalingScheduleEntry numReplicas
ScalingScheduleEntry replicaMemoryGb
ScalingScheduleEntryRequest numReplicas
ScalingScheduleEntryRequest replicaMemoryGb
ServicePostRequest maxReplicas
ServicePostRequest minReplicas
ServicePostRequest replicaMemoryGb

Implementation Guide

  1. Update the checked-in spec:
    curl -s https://api.clickhouse.cloud/v1 -o crates/clickhouse-cloud-api/clickhouse_cloud_openapi.json
  2. 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
  3. Add missing methods to crates/clickhouse-cloud-api/src/client.rs
  4. Fix any field optionality mismatches by hand-editing models.rs
    (flip TOption<T> and the matching skip_serializing_if attribute).
  5. Verify: cargo test -p clickhouse-cloud-api

Metadata

Metadata

Assignees

Labels

openapi-driftAutomated: live OpenAPI spec differs from the Rust library

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions