diff --git a/crates/clickhouse-cloud-api/clickhouse_cloud_openapi.json b/crates/clickhouse-cloud-api/clickhouse_cloud_openapi.json index 07a5d38..08b3a8e 100644 --- a/crates/clickhouse-cloud-api/clickhouse_cloud_openapi.json +++ b/crates/clickhouse-cloud-api/clickhouse_cloud_openapi.json @@ -5,7 +5,7 @@ "version": "1.0", "contact": { "name": "ClickHouse Support", - "url": "https://clickhouse.com/docs/en/cloud/manage/openapi?referrer=openapi-837009", + "url": "https://clickhouse.com/docs/en/cloud/manage/openapi?referrer=openapi-838082", "email": "support@clickhouse.com" } }, @@ -17069,6 +17069,15 @@ } } }, + "CustomPrivateDnsMapping": { + "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" + } + } + }, "CreateReversePrivateEndpoint": { "properties": { "description": { @@ -17138,6 +17147,13 @@ "null" ], "example": "projects/my-project/regions/us-central1/serviceAttachments/my-service" + }, + "customPrivateDnsMappings": { + "type": "array", + "description": "Private Preview. Optional list of custom private DNS mappings. Each mapping points a private DNS name at this endpoint without creating a Route53 hosted zone.", + "items": { + "$ref": "#/components/schemas/CustomPrivateDnsMapping" + } } } }, @@ -17211,6 +17227,13 @@ ], "example": "projects/my-project/regions/us-central1/serviceAttachments/my-service" }, + "customPrivateDnsMappings": { + "type": "array", + "description": "Private Preview. Optional list of custom private DNS mappings. Each mapping points a private DNS name at this endpoint without creating a Route53 hosted zone.", + "items": { + "$ref": "#/components/schemas/CustomPrivateDnsMapping" + } + }, "id": { "description": "Reverse private endpoint ID.", "type": "string", diff --git a/crates/clickhouse-cloud-api/src/models.rs b/crates/clickhouse-cloud-api/src/models.rs index 6851d87..38ac676 100644 --- a/crates/clickhouse-cloud-api/src/models.rs +++ b/crates/clickhouse-cloud-api/src/models.rs @@ -10128,6 +10128,8 @@ pub struct ClickStackUpdateDashboardRequest { /// `CreateReversePrivateEndpoint` from the ClickHouse Cloud API. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] pub struct CreateReversePrivateEndpoint { + #[serde(rename = "customPrivateDnsMappings", skip_serializing_if = "Option::is_none", default)] + pub custom_private_dns_mappings: Option>, #[serde(default)] pub description: String, #[serde(rename = "gcpServiceAttachment", skip_serializing_if = "Option::is_none", default)] @@ -10167,6 +10169,13 @@ pub struct CurrentScaling { pub effective_min_replicas: i64, } +/// `CustomPrivateDnsMapping` from the ClickHouse Cloud API. +#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] +pub struct CustomPrivateDnsMapping { + #[serde(rename = "privateDnsName", skip_serializing_if = "Option::is_none", default)] + pub private_dns_name: Option, +} + /// `GcpBackupBucket` from the ClickHouse Cloud API. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] pub struct GcpBackupBucket { @@ -10665,6 +10674,8 @@ pub struct ResourceTagsV1 { /// `ReversePrivateEndpoint` from the ClickHouse Cloud API. #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)] pub struct ReversePrivateEndpoint { + #[serde(rename = "customPrivateDnsMappings", skip_serializing_if = "Option::is_none", default)] + pub custom_private_dns_mappings: Option>, #[serde(default)] pub description: String, #[serde(rename = "dnsNames", default)] diff --git a/crates/clickhouse-cloud-api/tests/spec_coverage_test.rs b/crates/clickhouse-cloud-api/tests/spec_coverage_test.rs index 54e4484..95edd31 100644 --- a/crates/clickhouse-cloud-api/tests/spec_coverage_test.rs +++ b/crates/clickhouse-cloud-api/tests/spec_coverage_test.rs @@ -385,6 +385,18 @@ const OPTIONALITY_EXEMPTIONS: &[(&str, &str)] = &[ // `Option` lets callers omit it and have the API // generate the key as the spec's response description implies. ("ApiKeyPostRequest", "hashData"), + // `customPrivateDnsMappings` is documented as optional ("Private Preview. + // Optional list of custom private DNS mappings.") but the description + // heuristic keys on the literal "Optional" prefix, so the "Private + // Preview." lead-in causes it to be inferred as required. The field has + // no `required` array and the API treats it as opt-in. + ("CreateReversePrivateEndpoint", "customPrivateDnsMappings"), + ("ReversePrivateEndpoint", "customPrivateDnsMappings"), + // `CustomPrivateDnsMapping` is a single-field schema with no `required` + // array. The mapping object itself is only meaningful when supplied + // inside the (optional) `customPrivateDnsMappings` list, and the API + // treats the name as optional within that context. + ("CustomPrivateDnsMapping", "privateDnsName"), ]; fn assert_field_optionality(spec: &Value) {