Skip to content

Add CustomPrivateDnsMapping and customPrivateDnsMappings field#213

Open
sdairs wants to merge 1 commit into
mainfrom
issue-212-custom-private-dns-mappings
Open

Add CustomPrivateDnsMapping and customPrivateDnsMappings field#213
sdairs wants to merge 1 commit into
mainfrom
issue-212-custom-private-dns-mappings

Conversation

@sdairs
Copy link
Copy Markdown
Collaborator

@sdairs sdairs commented May 23, 2026

Summary

Closes #212.

  • Refresh the committed OpenAPI snapshot (clickhouse_cloud_openapi.json) to pick up the new CustomPrivateDnsMapping schema and the new customPrivateDnsMappings arrays on CreateReversePrivateEndpoint and ReversePrivateEndpoint.
  • Add the CustomPrivateDnsMapping Rust type in models.rs.
  • Add custom_private_dns_mappings: Option<Vec<CustomPrivateDnsMapping>> to both CreateReversePrivateEndpoint and ReversePrivateEndpoint.
  • Add three OPTIONALITY_EXEMPTIONS entries so spec_coverage_test accepts the optional modeling.

The three new fields are documented as optional but the description heuristic in scripts/resolve-field-requirements.py only matches the literal "Optional" prefix — descriptions like "Private Preview. Optional list of..." get misclassified as required. The fields are modelled as Option<T> to match real API behavior, with exemption entries explaining the divergence.

Test plan

  • cargo build (workspace)
  • cargo clippy --workspace --all-targets
  • cargo test -p clickhouse-cloud-api --lib
  • cargo test -p clickhouse-cloud-api --test spec_coverage_test (snapshot + --ignored live)
  • cargo test -p clickhousectl (37 request-shape tests)
  • python3 scripts/check-openapi-drift.py reports zero drift

🤖 Generated with Claude Code

Closes the OpenAPI drift gap reported in #212. The live spec adds a new
CustomPrivateDnsMapping schema and a customPrivateDnsMappings array on
both CreateReversePrivateEndpoint and ReversePrivateEndpoint; without
this change, DNS-mapping data was being silently dropped on
deserialization.

The new fields are documented as optional but the description heuristic
in resolve-field-requirements.py keys on the literal "Optional" prefix,
so "Private Preview. Optional list..." misclassifies as required. Model
the fields as Option<T> and add OPTIONALITY_EXEMPTIONS entries so the
spec-coverage test recognises the intentional divergence.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sdairs sdairs requested a review from iskakaushik as a code owner May 23, 2026 10:55
@sdairs sdairs deployed to cloud-integration May 23, 2026 10:55 — 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: 4 gaps between live spec and library

1 participant