Skip to content

OpenAPI drift: 36 gaps between live spec and library #298

Description

@github-actions

The live ClickHouse Cloud OpenAPI spec has drifted from the Rust API library.
The comparison was produced by the shared syn-based analyzer.

  • Live spec: https://api.clickhouse.cloud/v1
  • Client: crates/clickhouse-cloud-api/src/client.rs
  • Models: crates/clickhouse-cloud-api/src/models.rs
  • Analyzer: crates/clickhouse-openapi-analyzer

Summary

Change Count
Missing client methods 1
Extra client methods 0
Missing model types 4
Missing schema definitions 0
Missing struct fields 10
Extra struct fields 5
Missing enum values 9
Extra enum values 0
Field optionality mismatches 0
Beta status changes 1
Deprecated-field changes 0
Stale snapshot changes 5
Stale exemptions 1
New unsupported enum constraints 0
Acknowledged unsupported enum constraints 11

Missing Client Methods

click_pipe_schema_discovery

POST /v1/organizations/{organizationId}/services/{serviceId}/clickpipes/schemaDiscovery

Discover ClickPipe source schema

Operation spec JSON
{
  "summary": "Discover ClickPipe source schema",
  "description": "**This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Infers the schema (field names and ClickHouse data types) of a streaming ClickPipe source without creating a pipe. Supported for Kafka and Kinesis sources.",
  "operationId": "clickPipeSchemaDiscovery",
  "parameters": [
    {
      "in": "path",
      "name": "organizationId",
      "description": "ID of the organization that owns the service.",
      "required": true,
      "schema": {
        "type": "string",
        "format": "uuid"
      }
    },
    {
      "in": "path",
      "name": "serviceId",
      "description": "ID of the service to run schema discovery against.",
      "required": true,
      "schema": {
        "type": "string",
        "format": "uuid"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ClickPipeSchemaDiscoveryRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Successful response",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "status": {
                "type": "number",
                "description": "HTTP status code.",
                "example": 200
              },
              "requestId": {
                "type": "string",
                "description": "Unique id assigned to every request. UUIDv4",
                "format": "uuid"
              },
              "result": {
                "$ref": "#/components/schemas/ClickPipeSchemaDiscoveryResponse"
              }
            }
          }
        }
      }
    },
    "400": {
      "description": "The request cannot be processed due to a client error. Please verify your request parameters and try again.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "status": {
                "type": "number",
                "description": "HTTP status code.",
                "example": 400
              },
              "error": {
                "type": "string",
                "description": "Detailed error description."
              },
              "requestId": {
                "type": "string",
                "description": "Unique id assigned to every request. UUIDv4",
                "format": "uuid"
              }
            }
          }
        }
      }
    },
    "500": {
      "description": "An internal server error has occurred. If this issue persists, please contact ClickHouse Cloud support for assistance.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "status": {
                "type": "integer",
                "description": "HTTP status code.",
                "example": 500
              },
              "error": {
                "type": "string",
                "description": "Detailed error description."
              },
              "requestId": {
                "type": "string",
                "description": "Unique id assigned to every request. UUIDv4",
                "format": "uuid"
              }
            }
          }
        }
      }
    }
  },
  "tags": [
    "ClickPipes"
  ],
  "x-badges": [
    {
      "name": "Beta",
      "position": "after"
    }
  ]
}

Missing Struct Fields

  • /components/schemas/ClickPipeMutateMySQLSource/properties/serverId — ClickPipeMutateMySQLSource.serverId is missing from models.rs
  • /components/schemas/ClickPipeMySQLSource/properties/serverId — ClickPipeMySQLSource.serverId is missing from models.rs
  • /components/schemas/ClickPipePatchMySQLSource/properties/serverId — ClickPipePatchMySQLSource.serverId is missing from models.rs
  • /components/schemas/ScalingScheduleBaseConfig/properties/autoscalingMode — ScalingScheduleBaseConfig.autoscalingMode is missing from models.rs
  • /components/schemas/ScalingScheduleEntry/properties/autoscalingMode — ScalingScheduleEntry.autoscalingMode is missing from models.rs
  • /components/schemas/ScalingScheduleEntryRequest/properties/autoscalingMode — ScalingScheduleEntryRequest.autoscalingMode is missing from models.rs
  • /components/schemas/Service/properties/autoscalingMode — Service.autoscalingMode is missing from models.rs
  • /components/schemas/ServicePostRequest/properties/autoscalingMode — ServicePostRequest.autoscalingMode is missing from models.rs
  • /components/schemas/ServiceReplicaScalingPatchRequest/properties/autoscalingMode — ServiceReplicaScalingPatchRequest.autoscalingMode is missing from models.rs
  • /components/schemas/ServiceScalingPatchResponse/properties/autoscalingMode — ServiceScalingPatchResponse.autoscalingMode is missing from models.rs

Extra Struct Fields

  • /components/schemas/ScalingScheduleEntry — ScalingScheduleEntry.numReplicas has no matching OpenAPI property
  • /components/schemas/ScalingScheduleEntry — ScalingScheduleEntry.replicaMemoryGb has no matching OpenAPI property
  • /components/schemas/ScalingScheduleEntryRequest — ScalingScheduleEntryRequest.replicaMemoryGb has no matching OpenAPI property
  • /components/schemas/ServicePostRequest — ServicePostRequest.replicaMemoryGb has no matching OpenAPI property
  • /components/schemas/ServiceReplicaScalingPatchRequest — ServiceReplicaScalingPatchRequest.replicaMemoryGb has no matching OpenAPI property

Missing Enum Values

  • /components/schemas/ByocConfig/properties/regionId — ByocConfigRegionid has no variant for wire value "ca-central-1"
  • /components/schemas/ByocInfrastructurePostRequest/properties/regionId — ByocInfrastructurePostRequestRegionid has no variant for wire value "ca-central-1"
  • /components/schemas/InstancePrivateEndpoint/properties/region — InstancePrivateEndpointRegion has no variant for wire value "ca-central-1"
  • /components/schemas/OrganizationPatchPrivateEndpoint/properties/region — OrganizationPatchPrivateEndpointRegion has no variant for wire value "ca-central-1"
  • /components/schemas/OrganizationPrivateEndpoint/properties/region — OrganizationPrivateEndpointRegion has no variant for wire value "ca-central-1"
  • /components/schemas/pgStateProperty — PgStateProperty has no variant for wire value "stopped"
  • /components/schemas/ServicePostRequest/properties/region — ServicePostRequestRegion has no variant for wire value "ca-central-1"
  • /components/schemas/Service/properties/region — ServiceRegion has no variant for wire value "ca-central-1"
  • /components/schemas/ServiceScalingPatchResponse/properties/region — ServiceScalingPatchResponseRegion has no variant for wire value "ca-central-1"

Newly Beta Operations

  • /paths/~1v1~1organizations~1{organizationId}~1services~1{serviceId}~1clickpipes~1schemaDiscovery/post — click_pipe_schema_discovery is Beta in the spec but absent from BETA_OPERATIONS

New Operations Missing From Snapshot

  • /paths/~1v1~1organizations~1{organizationId}~1services~1{serviceId}~1clickpipes~1schemaDiscovery/post — operation click_pipe_schema_discovery is present in the target spec but absent from the snapshot

New Schemas Missing From Snapshot

  • /components/schemas/ClickPipeSchemaDiscoveryField — schema ClickPipeSchemaDiscoveryField is present in the target spec but absent from the snapshot
  • /components/schemas/ClickPipeSchemaDiscoveryRequest — schema ClickPipeSchemaDiscoveryRequest is present in the target spec but absent from the snapshot
  • /components/schemas/ClickPipeSchemaDiscoveryResponse — schema ClickPipeSchemaDiscoveryResponse is present in the target spec but absent from the snapshot
  • /components/schemas/ClickPipeSchemaDiscoverySource — schema ClickPipeSchemaDiscoverySource is present in the target spec but absent from the snapshot

Stale Exemptions

  • analyzer_config::ServicePostRequest::replicaMemoryGb — optionality exemption (ServicePostRequest, replicaMemoryGb) is stale

Missing Model Types

ClickPipeSchemaDiscoveryField (spec: ClickPipeSchemaDiscoveryField)

Schema JSON
{
  "properties": {
    "name": {
      "description": "Name of the inferred field.",
      "type": "string",
      "example": "user_id"
    },
    "type": {
      "description": "Inferred ClickHouse data type of the field.",
      "type": "string",
      "example": "Int64"
    },
    "optional": {
      "description": "Whether the field is optional (nullable) in the source.",
      "type": [
        "boolean",
        "null"
      ]
    }
  }
}

ClickPipeSchemaDiscoveryRequest (spec: ClickPipeSchemaDiscoveryRequest)

Schema JSON
{
  "properties": {
    "source": {
      "$ref": "#/components/schemas/ClickPipeSchemaDiscoverySource"
    }
  }
}

ClickPipeSchemaDiscoveryResponse (spec: ClickPipeSchemaDiscoveryResponse)

Schema JSON
{
  "properties": {
    "fields": {
      "type": "array",
      "description": "Inferred schema fields with their ClickHouse data types.",
      "items": {
        "$ref": "#/components/schemas/ClickPipeSchemaDiscoveryField"
      }
    }
  }
}

ClickPipeSchemaDiscoverySource (spec: ClickPipeSchemaDiscoverySource)

Schema JSON
{
  "properties": {
    "kafka": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/ClickPipePostKafkaSource"
        },
        {
          "type": "null"
        }
      ]
    },
    "kinesis": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/ClickPipePostKinesisSource"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}

Acknowledged Unsupported Enum Constraints

These locations are inventoried but cannot yet be compared to a typed Rust value enum.
They do not count as drift; new or stale locations do.

  • /components/schemas/ApiKey/properties/roles/items (models.rs::ApiKey::roles) — Rust type String is not an enum
  • /components/schemas/ApiKeyPatchRequest/properties/roles/items (models.rs::ApiKeyPatchRequest::roles) — Rust type String is not an enum
  • /components/schemas/ApiKeyPostRequest/properties/roles/items (models.rs::ApiKeyPostRequest::roles) — Rust type String is not an enum
  • /components/schemas/ByocInfrastructurePostRequest/properties/availabilityZoneSuffixes/items (models.rs::ByocInfrastructurePostRequest::availability_zone_suffixes) — Rust type String is not an enum
  • /components/schemas/InstanceServiceQueryApiEndpointsPostRequest/properties/roles/items (models.rs::InstanceServiceQueryApiEndpointsPostRequest::roles) — Rust type String is not an enum
  • /components/schemas/ServiceQueryAPIEndpoint/properties/roles/items (models.rs::ServiceQueryAPIEndpoint::roles) — Rust type String is not an enum
  • /components/schemas/UpgradeWindow/properties/duration (models.rs::UpgradeWindow::duration) — numeric enum constraints cannot be represented by Rust unit variants
  • /components/schemas/UpgradeWindow/properties/startHourUtc (models.rs::UpgradeWindow::start_hour_utc) — numeric enum constraints cannot be represented by Rust unit variants
  • /components/schemas/UpgradeWindowPutRequest/properties/startHourUtc (models.rs::UpgradeWindowPutRequest::start_hour_utc) — numeric enum constraints cannot be represented by Rust unit variants
  • /paths/~1v1~1organizations~1{organizationId}~1postgres~1{postgresId}~1slowQueryPatterns/get/parameters/8/schema (client.rs::Client::slow_query_patterns_get_list::sort_by) — Rust type str is not an enum
  • /paths/~1v1~1organizations~1{organizationId}~1postgres~1{postgresId}~1slowQueryPatterns/get/parameters/9/schema (client.rs::Client::slow_query_patterns_get_list::sort_order) — Rust type str is not an enum

Implementation Guide

  1. Replace crates/clickhouse-cloud-api/clickhouse_cloud_openapi.json with this same live document; do not hand-edit it.
  2. Follow each finding's spec_pointer and rust_item to update client.rs, models.rs, or meta.rs.
  3. Regenerate beta/deprecation metadata when applicable and add focused model/client tests.
  4. Edit crates/clickhouse-openapi-analyzer/src/config.rs only for a deliberate, documented divergence. New unsupported acknowledgements require a tracking issue.
  5. Run the analyzer and Cloud API tests, Clippy, Python renderer tests, and this dry run again; see AGENTS.md for the exact commands.

Metadata

Metadata

Assignees

No one assigned

    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