Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyangyu committed Sep 8, 2024
1 parent aec859d commit c01db9f
Show file tree
Hide file tree
Showing 11 changed files with 248 additions and 20 deletions.
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ generate-pingchat-client: ## Generate PingChat client
@echo "==> Generating PingChat client"
rm -rf pkg/tidbcloud/pingchat
cd tools/openapi-generator && npx openapi-generator-cli generate --inline-schema-options RESOLVE_INLINE_ENUMS=true --additional-properties=withGoMod=false,enumClassPrefix=true --global-property=apiTests=false,apiDocs=false,modelDocs=false,modelTests=false -i ../../pkg/tidbcloud/pingchat.swagger.json -g go -o ../../pkg/tidbcloud/pingchat --package-name pingchat
go fmt ./pkg/pingchat/...
go fmt ./pkg/tidbcloud/pingchat/...

.PHONY: addcopy
addcopy: ## Add copyright to all files
Expand All @@ -41,23 +41,23 @@ addcopy: ## Add copyright to all files
generate-v1beta1-client: install-openapi-generator ## Generate v1beta1 client
@echo "==> Generating serverless branch client"
rm -rf pkg/tidbcloud/v1beta1/serverless/branch
cd tools/openapi-generator && npx openapi-generator-cli generate --additional-properties=withGoMod=false,enumClassPrefix=true,disallowAdditionalPropertiesIfNotPresent=false --global-property=apiTests=false,apiDocs=false,modelDocs=false,modelTests=false -i ../../pkg/tidbcloud/v1beta1/serverless/branch.swagger.json -g go -o ../../pkg/tidbcloud/v1beta1/serverless/branch --package-name branch
cd tools/openapi-generator && npx openapi-generator-cli generate --inline-schema-options RESOLVE_INLINE_ENUMS=true --additional-properties=withGoMod=false,enumClassPrefix=true,disallowAdditionalPropertiesIfNotPresent=false --global-property=apiTests=false,apiDocs=false,modelDocs=false,modelTests=false -i ../../pkg/tidbcloud/v1beta1/serverless/branch.swagger.json -g go -o ../../pkg/tidbcloud/v1beta1/serverless/branch --package-name branch
@echo "==> Generating serverless cluster client"
rm -rf pkg/tidbcloud/v1beta1/serverless/cluster
cd tools/openapi-generator && npx openapi-generator-cli generate --additional-properties=withGoMod=false,enumClassPrefix=true,disallowAdditionalPropertiesIfNotPresent=false --global-property=apiTests=false,apiDocs=false,modelDocs=false,modelTests=false -i ../../pkg/tidbcloud/v1beta1/serverless/cluster.swagger.json -g go -o ../../pkg/tidbcloud/v1beta1/serverless/cluster --package-name cluster --skip-validate-spec
cd tools/openapi-generator && npx openapi-generator-cli generate --inline-schema-options RESOLVE_INLINE_ENUMS=true --additional-properties=withGoMod=false,enumClassPrefix=true,disallowAdditionalPropertiesIfNotPresent=false --global-property=apiTests=false,apiDocs=false,modelDocs=false,modelTests=false -i ../../pkg/tidbcloud/v1beta1/serverless/cluster.swagger.json -g go -o ../../pkg/tidbcloud/v1beta1/serverless/cluster --package-name cluster --skip-validate-spec
@echo "==> Generating serverless export client"
rm -rf pkg/tidbcloud/v1beta1/serverless/export
cd tools/openapi-generator && npx openapi-generator-cli generate --additional-properties=withGoMod=false,enumClassPrefix=true,disallowAdditionalPropertiesIfNotPresent=false --global-property=apiTests=false,apiDocs=false,modelDocs=false,modelTests=false -i ../../pkg/tidbcloud/v1beta1/serverless/export.swagger.json -g go -o ../../pkg/tidbcloud/v1beta1/serverless/export --package-name export
cd tools/openapi-generator && npx openapi-generator-cli generate --inline-schema-options RESOLVE_INLINE_ENUMS=true --additional-properties=withGoMod=false,enumClassPrefix=true,disallowAdditionalPropertiesIfNotPresent=false --global-property=apiTests=false,apiDocs=false,modelDocs=false,modelTests=false -i ../../pkg/tidbcloud/v1beta1/serverless/export.swagger.json -g go -o ../../pkg/tidbcloud/v1beta1/serverless/export --package-name export
@echo "==> Generating iam client"
rm -rf pkg/tidbcloud/v1beta1/iam
cd tools/openapi-generator && npx openapi-generator-cli generate --additional-properties=withGoMod=false,enumClassPrefix=true,disallowAdditionalPropertiesIfNotPresent=false --global-property=apiTests=false,apiDocs=false,modelDocs=false,modelTests=false -i ../../pkg/tidbcloud/v1beta1/iam.swagger.json -g go -o ../../pkg/tidbcloud/v1beta1/iam --package-name iam
cd tools/openapi-generator && npx openapi-generator-cli generate --inline-schema-options RESOLVE_INLINE_ENUMS=true --additional-properties=withGoMod=false,enumClassPrefix=true,disallowAdditionalPropertiesIfNotPresent=false --global-property=apiTests=false,apiDocs=false,modelDocs=false,modelTests=false -i ../../pkg/tidbcloud/v1beta1/iam.swagger.json -g go -o ../../pkg/tidbcloud/v1beta1/iam --package-name iam
@echo "==> Generating serverless br client"
rm -rf pkg/tidbcloud/v1beta1/serverless/br
cd tools/openapi-generator && npx openapi-generator-cli generate --additional-properties=withGoMod=false,enumClassPrefix=true,disallowAdditionalPropertiesIfNotPresent=false --global-property=apiTests=false,apiDocs=false,modelDocs=false,modelTests=false -i ../../pkg/tidbcloud/v1beta1/serverless/br.swagger.json -g go -o ../../pkg/tidbcloud/v1beta1/serverless/br --package-name br
cd tools/openapi-generator && npx openapi-generator-cli generate --inline-schema-options RESOLVE_INLINE_ENUMS=true --additional-properties=withGoMod=false,enumClassPrefix=true,disallowAdditionalPropertiesIfNotPresent=false --global-property=apiTests=false,apiDocs=false,modelDocs=false,modelTests=false -i ../../pkg/tidbcloud/v1beta1/serverless/br.swagger.json -g go -o ../../pkg/tidbcloud/v1beta1/serverless/br --package-name br
@echo "==> Generating serverless import client"
rm -rf pkg/tidbcloud/v1beta1/serverless/import
cd tools/openapi-generator && npx openapi-generator-cli generate --additional-properties=withGoMod=false,enumClassPrefix=true,disallowAdditionalPropertiesIfNotPresent=false --global-property=apiTests=false,apiDocs=false,modelDocs=false,modelTests=false -i ../../pkg/tidbcloud/v1beta1/serverless/import.swagger.json -g go -o ../../pkg/tidbcloud/v1beta1/serverless/import --package-name imp
go fmt ./pkg/v1beta1/...
cd tools/openapi-generator && npx openapi-generator-cli generate --inline-schema-options RESOLVE_INLINE_ENUMS=true --additional-properties=withGoMod=false,enumClassPrefix=true,disallowAdditionalPropertiesIfNotPresent=false --global-property=apiTests=false,apiDocs=false,modelDocs=false,modelTests=false -i ../../pkg/tidbcloud/v1beta1/serverless/import.swagger.json -g go -o ../../pkg/tidbcloud/v1beta1/serverless/import --package-name imp
go fmt ./pkg/tidbcloud/v1beta1/...

.PHONY: install-openapi-generator
install-openapi-generator:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ model_branch_endpoints_private.go
model_branch_endpoints_private_aws.go
model_branch_endpoints_private_gcp.go
model_branch_endpoints_public.go
model_branch_service_get_branch_view_parameter.go
model_branch_state.go
model_branch_usage.go
model_branch_view.go
Expand Down
1 change: 1 addition & 0 deletions pkg/tidbcloud/v1beta1/serverless/branch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ Class | Method | HTTP request | Description
- [BranchEndpointsPrivateAWS](docs/BranchEndpointsPrivateAWS.md)
- [BranchEndpointsPrivateGCP](docs/BranchEndpointsPrivateGCP.md)
- [BranchEndpointsPublic](docs/BranchEndpointsPublic.md)
- [BranchServiceGetBranchViewParameter](docs/BranchServiceGetBranchViewParameter.md)
- [BranchState](docs/BranchState.md)
- [BranchUsage](docs/BranchUsage.md)
- [BranchView](docs/BranchView.md)
Expand Down
10 changes: 6 additions & 4 deletions pkg/tidbcloud/v1beta1/serverless/branch/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,7 @@ paths:
in: query
name: view
schema:
enum:
- BASIC
- FULL
type: string
$ref: '#/components/schemas/BranchService_GetBranch_view_parameter'
responses:
"200":
content:
Expand Down Expand Up @@ -453,4 +450,9 @@ components:
$ref: '#/components/schemas/Any'
type: array
type: object
BranchService_GetBranch_view_parameter:
enum:
- BASIC
- FULL
type: string
x-original-swagger-version: "2.0"
4 changes: 2 additions & 2 deletions pkg/tidbcloud/v1beta1/serverless/branch/api_branch_service.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ model_private_gcp.go
model_protobuf_any.go
model_required__the_cluster_to_be_updated_.go
model_serverless_service_change_root_password_body.go
model_serverless_service_get_cluster_view_parameter.go
model_serverlessv1beta1_cluster_view.go
model_tidb_cloud_open_apiserverlessv1beta1_cluster.go
model_tidb_cloud_open_apiserverlessv1beta1_list_clusters_response.go
Expand Down
1 change: 1 addition & 0 deletions pkg/tidbcloud/v1beta1/serverless/cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ Class | Method | HTTP request | Description
- [ProtobufAny](docs/ProtobufAny.md)
- [RequiredTheClusterToBeUpdated](docs/RequiredTheClusterToBeUpdated.md)
- [ServerlessServiceChangeRootPasswordBody](docs/ServerlessServiceChangeRootPasswordBody.md)
- [ServerlessServiceGetClusterViewParameter](docs/ServerlessServiceGetClusterViewParameter.md)
- [Serverlessv1beta1ClusterView](docs/Serverlessv1beta1ClusterView.md)
- [TidbCloudOpenApiserverlessv1beta1Cluster](docs/TidbCloudOpenApiserverlessv1beta1Cluster.md)
- [TidbCloudOpenApiserverlessv1beta1ListClustersResponse](docs/TidbCloudOpenApiserverlessv1beta1ListClustersResponse.md)
Expand Down
10 changes: 6 additions & 4 deletions pkg/tidbcloud/v1beta1/serverless/cluster/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,7 @@ paths:
in: query
name: view
schema:
enum:
- BASIC
- FULL
type: string
$ref: '#/components/schemas/ServerlessService_GetCluster_view_parameter'
responses:
"200":
content:
Expand Down Expand Up @@ -875,6 +872,11 @@ components:
required:
- updateMask
type: object
ServerlessService_GetCluster_view_parameter:
enum:
- BASIC
- FULL
type: string
Required__The_cluster_to_be_updated_:
description: Required. The cluster to be updated.
properties:
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c01db9f

Please sign in to comment.