Skip to content

Commit

Permalink
regenerate v1beta1 client
Browse files Browse the repository at this point in the history
  • Loading branch information
Linchin committed Oct 26, 2022
1 parent 3953bf6 commit 02769d7
Show file tree
Hide file tree
Showing 252 changed files with 33,829 additions and 112 deletions.
102 changes: 51 additions & 51 deletions backend/api/hack/generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,67 +69,67 @@ cp -a ${TMP_OUTPUT}/backend/api/${API_VERSION}/*.swagger.json ./backend/api/${AP
# Note: use backend/backend/api/${API_VERSION}/swagger/{run,job,experiment,pipeline,pipeline.upload,healthz}.swagger.json when apt-get can install jq-1.6
jq -s 'reduce .[] as $item ({}; . * $item) | .info.title = "Kubeflow Pipelines API" | .info.description = "This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition." | .info.version = "'$KFP_VERSION'" | .info.contact = { "name": "google", "email": "[email protected]", "url": "https://www.google.com" } | .info.license = { "name": "Apache 2.0", "url": "https://raw.githubusercontent.com/kubeflow/pipelines/master/LICENSE" }' \
backend/api/${API_VERSION}/swagger/experiment.swagger.json \
backend/api/${API_VERSION}/swagger/run.swagger.json \
backend/api/${API_VERSION}/swagger/job.swagger.json \
backend/api/${API_VERSION}/swagger/pipeline.swagger.json \
backend/api/${API_VERSION}/swagger/pipeline.upload.swagger.json \
backend/api/${API_VERSION}/swagger/healthz.swagger.json \
> "backend/api/${API_VERSION}/swagger/kfp_api_${API_VERSION}_single_file.swagger.json"
# backend/api/${API_VERSION}/swagger/run.swagger.json \
# backend/api/${API_VERSION}/swagger/job.swagger.json \
# backend/api/${API_VERSION}/swagger/pipeline.swagger.json \
# backend/api/${API_VERSION}/swagger/pipeline.upload.swagger.json \
# backend/api/${API_VERSION}/swagger/healthz.swagger.json \
# Generate go_http_client from swagger json.
# swagger generate client \
# -f backend/api/${API_VERSION}/swagger/job.swagger.json \
# -A job \
# --principal models.Principal \
# -c job_client \
# -m job_model \
# -t backend/api/${API_VERSION}/go_http_client
# swagger generate client \
# -f backend/api/${API_VERSION}/swagger/run.swagger.json \
# -A run \
# --principal models.Principal \
# -c run_client \
# -m run_model \
# -t backend/api/${API_VERSION}/go_http_client
swagger generate client \
-f backend/api/${API_VERSION}/swagger/job.swagger.json \
-A job \
--principal models.Principal \
-c job_client \
-m job_model \
-t backend/api/${API_VERSION}/go_http_client
swagger generate client \
-f backend/api/${API_VERSION}/swagger/run.swagger.json \
-A run \
--principal models.Principal \
-c run_client \
-m run_model \
-t backend/api/${API_VERSION}/go_http_client
swagger generate client \
-f backend/api/${API_VERSION}/swagger/experiment.swagger.json \
-A experiment \
--principal models.Principal \
-c experiment_client \
-m experiment_model \
-t backend/api/${API_VERSION}/go_http_client
# swagger generate client \
# -f backend/api/${API_VERSION}/swagger/pipeline.swagger.json \
# -A pipeline \
# --principal models.Principal \
# -c pipeline_client \
# -m pipeline_model \
# -t backend/api/${API_VERSION}/go_http_client
# swagger generate client \
# -f backend/api/${API_VERSION}/swagger/pipeline.upload.swagger.json \
# -A pipeline_upload \
# --principal models.Principal \
# -c pipeline_upload_client \
# -m pipeline_upload_model \
# -t backend/api/${API_VERSION}/go_http_client
# swagger generate client \
# -f backend/api/${API_VERSION}/swagger/visualization.swagger.json \
# -A visualization \
# --principal models.Principal \
# -c visualization_client \
# -m visualization_model \
# -t backend/api/${API_VERSION}/go_http_client
# swagger generate client \
# -f backend/api/${API_VERSION}/swagger/healthz.swagger.json \
# -A healthz \
# --principal models.Principal \
# -c healthz_client \
# -m healthz_model \
# -t backend/api/${API_VERSION}/go_http_client
swagger generate client \
-f backend/api/${API_VERSION}/swagger/pipeline.swagger.json \
-A pipeline \
--principal models.Principal \
-c pipeline_client \
-m pipeline_model \
-t backend/api/${API_VERSION}/go_http_client
swagger generate client \
-f backend/api/${API_VERSION}/swagger/pipeline.upload.swagger.json \
-A pipeline_upload \
--principal models.Principal \
-c pipeline_upload_client \
-m pipeline_upload_model \
-t backend/api/${API_VERSION}/go_http_client
swagger generate client \
-f backend/api/${API_VERSION}/swagger/visualization.swagger.json \
-A visualization \
--principal models.Principal \
-c visualization_client \
-m visualization_model \
-t backend/api/${API_VERSION}/go_http_client
swagger generate client \
-f backend/api/${API_VERSION}/swagger/healthz.swagger.json \
-A healthz \
--principal models.Principal \
-c healthz_client \
-m healthz_model \
-t backend/api/${API_VERSION}/go_http_client
# Hack to fix an issue with go-swagger
# See https://github.com/go-swagger/go-swagger/issues/1381 for details.
# sed -i -- 's/MaxConcurrency int64 `json:"max_concurrency,omitempty"`/MaxConcurrency int64 `json:"max_concurrency,omitempty,string"`/g' backend/api/${API_VERSION}/go_http_client/job_model/${API_VERSION}_job.go
# sed -i -- 's/IntervalSecond int64 `json:"interval_second,omitempty"`/IntervalSecond int64 `json:"interval_second,omitempty,string"`/g' backend/api/${API_VERSION}/go_http_client/job_model/${API_VERSION}_periodic_schedule.go
# sed -i -- 's/MaxConcurrency string `json:"max_concurrency,omitempty"`/MaxConcurrency int64 `json:"max_concurrency,omitempty,string"`/g' backend/api/${API_VERSION}/go_http_client/job_model/${API_VERSION}_job.go
# sed -i -- 's/IntervalSecond string `json:"interval_second,omitempty"`/IntervalSecond int64 `json:"interval_second,omitempty,string"`/g' backend/api/${API_VERSION}/go_http_client/job_model/${API_VERSION}_periodic_schedule.go
sed -i -- 's/MaxConcurrency int64 `json:"max_concurrency,omitempty"`/MaxConcurrency int64 `json:"max_concurrency,omitempty,string"`/g' backend/api/${API_VERSION}/go_http_client/job_model/${API_VERSION}_job.go
sed -i -- 's/IntervalSecond int64 `json:"interval_second,omitempty"`/IntervalSecond int64 `json:"interval_second,omitempty,string"`/g' backend/api/${API_VERSION}/go_http_client/job_model/${API_VERSION}_periodic_schedule.go
sed -i -- 's/MaxConcurrency string `json:"max_concurrency,omitempty"`/MaxConcurrency int64 `json:"max_concurrency,omitempty,string"`/g' backend/api/${API_VERSION}/go_http_client/job_model/${API_VERSION}_job.go
sed -i -- 's/IntervalSecond string `json:"interval_second,omitempty"`/IntervalSecond int64 `json:"interval_second,omitempty,string"`/g' backend/api/${API_VERSION}/go_http_client/job_model/${API_VERSION}_periodic_schedule.go
# Execute the //go:generate directives in the generated code.
cd backend/api && go generate ./...
117 changes: 117 additions & 0 deletions backend/api/v1beta1/go_http_client/healthz_client/healthz_client.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.

Loading

0 comments on commit 02769d7

Please sign in to comment.