Skip to content

Resolve OpenAPI spec drift (#139)#141

Open
sdairs wants to merge 2 commits intomainfrom
issue-139-openapi-drift
Open

Resolve OpenAPI spec drift (#139)#141
sdairs wants to merge 2 commits intomainfrom
issue-139-openapi-drift

Conversation

@sdairs
Copy link
Copy Markdown
Collaborator

@sdairs sdairs commented May 7, 2026

Summary

Resolves #139 by syncing the typed Rust client with the live ClickHouse Cloud OpenAPI spec.

  • Refreshed the checked-in spec snapshot.
  • Added 9 client methods (4 ClickHouse settings + 5 organization role endpoints).
  • Added 8 model types and missing fields/enums on existing schemas (gcpServiceAttachment, thresholdMax, executionErrors, where/whereLanguage on filters, numericUnit, data_rate/throughput).

The remaining 20 "field optionality" mismatches reported on the issue are intentional OPTIONALITY_EXEMPTIONS for ServicePostRequest — the spec marks them required but the API rejects zero-value defaults, so they correctly stay Option<T>.

Test plan

  • cargo build (workspace)
  • cargo test (workspace, 247+86 passing)
  • cargo test -p clickhouse-cloud-api --test spec_coverage_test -- --ignored (5/5 live-spec tests pass)
  • cargo clippy (no new warnings from this change)

🤖 Generated with Claude Code

- Refresh checked-in spec snapshot from live API.
- Add 9 new client methods: ClickHouse settings (get/list/schema/update)
  and organization roles (list/get/create/update/delete).
- Add 8 new model types: ServiceClickhouseSetting{,SchemaEntry,Warning},
  ServiceClickhouseSettings{List,PatchRequest,PatchResponse,Schema},
  ClickStackAlertExecutionError.
- Add missing fields to existing structs: gcpServiceAttachment on
  CreateReversePrivateEndpoint/ReversePrivateEndpoint, thresholdMax/
  executionErrors on ClickStack alert structs, where/whereLanguage on
  ClickStackFilter{,Input}, numericUnit on ClickStackNumberFormat.
- Extend ClickStackNumberFormatOutput with data_rate/throughput.
- Add inline enums for new fields (whereLanguage variants, numericUnit,
  AlertExecutionError type).

Verified: cargo test plus the live-spec ignored tests (5/5) pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sdairs sdairs requested a review from iskakaushik as a code owner May 7, 2026 15:29
@sdairs sdairs temporarily deployed to cloud-integration May 7, 2026 15:29 — with GitHub Actions Inactive
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sdairs sdairs deployed to cloud-integration May 7, 2026 15:41 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenAPI drift: 44 gaps between live spec and library

1 participant