Skip to content

Commit

Permalink
Add generated client from visualization swagger (#1979)
Browse files Browse the repository at this point in the history
* Update backend/api/generate_api.sh to build visualization swagger file

* Built visualization client
  • Loading branch information
ajchili authored and k8s-ci-robot committed Aug 30, 2019
1 parent f5b2f24 commit cd2a684
Show file tree
Hide file tree
Showing 12 changed files with 1,015 additions and 0 deletions.
8 changes: 8 additions & 0 deletions backend/api/generate_api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ ${SWAGGER_CMD} generate client \
-m pipeline_model \
-t go_http_client

${SWAGGER_CMD} generate client \
-f ${DIR}/swagger/visualization.swagger.json \
-A visualization \
--principal models.Principal \
-c visualization_client \
-m visualization_model \
-t 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' ${DIR}/go_http_client/job_model/api_job.go
Expand Down
14 changes: 14 additions & 0 deletions backend/api/go_http_client/visualization_client/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = ["visualization_client.go"],
importpath = "github.com/kubeflow/pipelines/backend/api/go_http_client/visualization_client",
visibility = ["//visibility:public"],
deps = [
"//backend/api/go_http_client/visualization_client/visualization_service:go_default_library",
"@com_github_go_openapi_runtime//:go_default_library",
"@com_github_go_openapi_runtime//client:go_default_library",
"@com_github_go_openapi_strfmt//:go_default_library",
],
)

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
@@ -0,0 +1,19 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = [
"create_visualization_parameters.go",
"create_visualization_responses.go",
"visualization_service_client.go",
],
importpath = "github.com/kubeflow/pipelines/backend/api/go_http_client/visualization_client/visualization_service",
visibility = ["//visibility:public"],
deps = [
"//backend/api/go_http_client/visualization_model:go_default_library",
"@com_github_go_openapi_errors//:go_default_library",
"@com_github_go_openapi_runtime//:go_default_library",
"@com_github_go_openapi_runtime//client:go_default_library",
"@com_github_go_openapi_strfmt//:go_default_library",
],
)

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

Loading

0 comments on commit cd2a684

Please sign in to comment.