Skip to content

Commit 14901e6

Browse files
committed
update swagger
1 parent 4f1b9c3 commit 14901e6

9 files changed

Lines changed: 730 additions & 321 deletions

File tree

internal/cli/serverless/changefeed/template.go

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,18 @@ const (
5454
"avro_config": {
5555
"decimal_handling_mode": "PRECISE",
5656
"bigint_unsigned_handling_mode": "LONG",
57-
"schema_registry": {
58-
"schema_registry_endpoints": "",
57+
// one of "confluent_schema_registry", "aws_glue_schema_registry"
58+
"confluent_schema_registry": {
59+
"endpoint": "",
5960
"enable_http_auth": false,
6061
"user_name": "",
6162
"password": ""
63+
},
64+
"aws_glue_schema_registry": {
65+
"region": "",
66+
"name": "",
67+
"access_key_id": "",
68+
"secret_access_key": ""
6269
}
6370
}
6471
},
@@ -116,11 +123,17 @@ const (
116123
"avro_config": {
117124
"decimal_handling_mode": "PRECISE",
118125
"bigint_unsigned_handling_mode": "LONG",
119-
"schema_registry": {
126+
"confluent_schema_registry": {
120127
"schema_registry_endpoints": "",
121128
"enable_http_auth": false,
122129
"user_name": "",
123130
"password": ""
131+
},
132+
"aws_glue_schema_registry": {
133+
"region": "",
134+
"name": "",
135+
"access_key_id": "",
136+
"secret_access_key": ""
124137
}
125138
}
126139
},

pkg/tidbcloud/v1beta1/serverless/cdc.swagger.json

Lines changed: 66 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -571,8 +571,21 @@
571571
"bigintUnsignedHandlingMode": {
572572
"$ref": "#/definitions/BigintUnsignedHandlingMode.Enum"
573573
},
574-
"schemaRegistry": {
575-
"$ref": "#/definitions/SchemaRegistry"
574+
"confluentSchemaRegistry": {
575+
"description": "Confluent Schema Registry.",
576+
"allOf": [
577+
{
578+
"$ref": "#/definitions/ConfluentSchemaRegistry"
579+
}
580+
]
581+
},
582+
"awsGlueSchemaRegistry": {
583+
"description": "AWS Glue Schema Registry.",
584+
"allOf": [
585+
{
586+
"$ref": "#/definitions/GlueSchemaRegistry"
587+
}
588+
]
576589
}
577590
}
578591
},
@@ -677,6 +690,30 @@
677690
}
678691
}
679692
},
693+
"ConfluentSchemaRegistry": {
694+
"type": "object",
695+
"properties": {
696+
"endpoint": {
697+
"type": "string",
698+
"description": "Required. The schema registry endpoint."
699+
},
700+
"enableHttpAuth": {
701+
"type": "boolean",
702+
"description": "Optional. Enable HTTP authentication."
703+
},
704+
"userName": {
705+
"type": "string",
706+
"description": "Optional. The username for HTTP authentication."
707+
},
708+
"password": {
709+
"type": "string",
710+
"description": "Optional. The password for HTTP authentication."
711+
}
712+
},
713+
"required": [
714+
"endpoint"
715+
]
716+
},
680717
"Connector": {
681718
"type": "object",
682719
"properties": {
@@ -1044,6 +1081,33 @@
10441081
}
10451082
}
10461083
},
1084+
"GlueSchemaRegistry": {
1085+
"type": "object",
1086+
"properties": {
1087+
"region": {
1088+
"type": "string",
1089+
"description": "Required. The region of schema registry."
1090+
},
1091+
"name": {
1092+
"type": "string",
1093+
"description": "Required. The name of schema registry."
1094+
},
1095+
"accessKeyId": {
1096+
"type": "string",
1097+
"description": "Required. The AWS access key ID."
1098+
},
1099+
"secretAccessKey": {
1100+
"type": "string",
1101+
"description": "Required. The AWS secret access key."
1102+
}
1103+
},
1104+
"required": [
1105+
"region",
1106+
"name",
1107+
"accessKeyId",
1108+
"secretAccessKey"
1109+
]
1110+
},
10471111
"KafkaAuthType.Enum": {
10481112
"type": "string",
10491113
"enum": [
@@ -1269,23 +1333,6 @@
12691333
],
12701334
"description": " - PENDING_ACCEPTANCE: The private link endpoint is pending acceptance.\n - PENDING: The private link endpoint is pending.\n - AVAILABLE: The private link endpoint is available.\n - REJECTED: The private link endpoint is rejected.\n - EXPIRED: The private link endpoint is Expired.\n - FAILED: The private link endpoint is failed.\n - PARTIAL: The private link endpoint is partial.\n - DELETING: The private link endpoint is deleting."
12711335
},
1272-
"SchemaRegistry": {
1273-
"type": "object",
1274-
"properties": {
1275-
"schemaRegistryEndpoints": {
1276-
"type": "string"
1277-
},
1278-
"enableHttpAuth": {
1279-
"type": "boolean"
1280-
},
1281-
"userName": {
1282-
"type": "string"
1283-
},
1284-
"password": {
1285-
"type": "string"
1286-
}
1287-
}
1288-
},
12891336
"SinkInfo": {
12901337
"type": "object",
12911338
"properties": {

pkg/tidbcloud/v1beta1/serverless/cdc/.openapi-generator/FILES

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ model_cdc_filter.go
1717
model_cdc_protocol_enum.go
1818
model_cdc_state_enum.go
1919
model_column_selector.go
20+
model_confluent_schema_registry.go
2021
model_connector.go
2122
model_connector_id.go
2223
model_connector_service_create_connector_body.go
@@ -31,6 +32,7 @@ model_data_format.go
3132
model_decimal_handling_mode_enum.go
3233
model_describe_schema_table_resp.go
3334
model_event_filter_rule.go
35+
model_glue_schema_registry.go
3436
model_kafka_auth_type_enum.go
3537
model_kafka_compression_type_enum.go
3638
model_kafka_endpoint.go
@@ -43,7 +45,6 @@ model_partition_dispatcher_config.go
4345
model_partition_dispatcher_enum.go
4446
model_private_link_endpoint.go
4547
model_private_link_endpoint_state_enum.go
46-
model_schema_registry.go
4748
model_sink_info.go
4849
model_start_mode_enum.go
4950
model_start_position.go

pkg/tidbcloud/v1beta1/serverless/cdc/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ Class | Method | HTTP request | Description
104104
- [CDCProtocolEnum](docs/CDCProtocolEnum.md)
105105
- [CDCStateEnum](docs/CDCStateEnum.md)
106106
- [ColumnSelector](docs/ColumnSelector.md)
107+
- [ConfluentSchemaRegistry](docs/ConfluentSchemaRegistry.md)
107108
- [Connector](docs/Connector.md)
108109
- [ConnectorID](docs/ConnectorID.md)
109110
- [ConnectorServiceCreateConnectorBody](docs/ConnectorServiceCreateConnectorBody.md)
@@ -118,6 +119,7 @@ Class | Method | HTTP request | Description
118119
- [DecimalHandlingModeEnum](docs/DecimalHandlingModeEnum.md)
119120
- [DescribeSchemaTableResp](docs/DescribeSchemaTableResp.md)
120121
- [EventFilterRule](docs/EventFilterRule.md)
122+
- [GlueSchemaRegistry](docs/GlueSchemaRegistry.md)
121123
- [KafkaAuthTypeEnum](docs/KafkaAuthTypeEnum.md)
122124
- [KafkaCompressionTypeEnum](docs/KafkaCompressionTypeEnum.md)
123125
- [KafkaEndpoint](docs/KafkaEndpoint.md)
@@ -130,7 +132,6 @@ Class | Method | HTTP request | Description
130132
- [PartitionDispatcherEnum](docs/PartitionDispatcherEnum.md)
131133
- [PrivateLinkEndpoint](docs/PrivateLinkEndpoint.md)
132134
- [PrivateLinkEndpointStateEnum](docs/PrivateLinkEndpointStateEnum.md)
133-
- [SchemaRegistry](docs/SchemaRegistry.md)
134135
- [SinkInfo](docs/SinkInfo.md)
135136
- [StartModeEnum](docs/StartModeEnum.md)
136137
- [StartPosition](docs/StartPosition.md)

pkg/tidbcloud/v1beta1/serverless/cdc/api/openapi.yaml

Lines changed: 47 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -460,8 +460,16 @@ components:
460460
$ref: '#/components/schemas/DecimalHandlingMode.Enum'
461461
bigintUnsignedHandlingMode:
462462
$ref: '#/components/schemas/BigintUnsignedHandlingMode.Enum'
463-
schemaRegistry:
464-
$ref: '#/components/schemas/SchemaRegistry'
463+
confluentSchemaRegistry:
464+
allOf:
465+
- $ref: '#/components/schemas/ConfluentSchemaRegistry'
466+
description: Confluent Schema Registry.
467+
type: object
468+
awsGlueSchemaRegistry:
469+
allOf:
470+
- $ref: '#/components/schemas/GlueSchemaRegistry'
471+
description: AWS Glue Schema Registry.
472+
type: object
465473
type: object
466474
BigintUnsignedHandlingMode.Enum:
467475
description: |2-
@@ -546,6 +554,23 @@ components:
546554
type: string
547555
type: array
548556
type: object
557+
ConfluentSchemaRegistry:
558+
properties:
559+
endpoint:
560+
description: Required. The schema registry endpoint.
561+
type: string
562+
enableHttpAuth:
563+
description: Optional. Enable HTTP authentication.
564+
type: boolean
565+
userName:
566+
description: Optional. The username for HTTP authentication.
567+
type: string
568+
password:
569+
description: Optional. The password for HTTP authentication.
570+
type: string
571+
required:
572+
- endpoint
573+
type: object
549574
Connector:
550575
example:
551576
filter: "{}"
@@ -852,6 +877,26 @@ components:
852877
type: string
853878
type: array
854879
type: object
880+
GlueSchemaRegistry:
881+
properties:
882+
region:
883+
description: Required. The region of schema registry.
884+
type: string
885+
name:
886+
description: Required. The name of schema registry.
887+
type: string
888+
accessKeyId:
889+
description: Required. The AWS access key ID.
890+
type: string
891+
secretAccessKey:
892+
description: Required. The AWS secret access key.
893+
type: string
894+
required:
895+
- accessKeyId
896+
- name
897+
- region
898+
- secretAccessKey
899+
type: object
855900
KafkaAuthType.Enum:
856901
description: |2-
857902
- DISABLE: No authentication.
@@ -1047,17 +1092,6 @@ components:
10471092
- PARTIAL
10481093
- DELETING
10491094
type: string
1050-
SchemaRegistry:
1051-
properties:
1052-
schemaRegistryEndpoints:
1053-
type: string
1054-
enableHttpAuth:
1055-
type: boolean
1056-
userName:
1057-
type: string
1058-
password:
1059-
type: string
1060-
type: object
10611095
SinkInfo:
10621096
properties:
10631097
type:

0 commit comments

Comments
 (0)