Skip to content

Commit

Permalink
go-swagger paasta api
Browse files Browse the repository at this point in the history
  • Loading branch information
Maksym Melnychok committed May 13, 2020
1 parent c742d83 commit 5074eaf
Show file tree
Hide file tree
Showing 86 changed files with 10,738 additions and 1 deletion.
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,20 @@ deb_%: clean docker_build_%

itest_%: deb_%
@echo "Built package for $*"

gen-paasta-api:
rm -rf pkg/paastaapi
mkdir -p pkg/paastaapi
rm swagger.json
curl -o swagger.json https://raw.githubusercontent.com/Yelp/paasta/master/paasta_tools/api/api_docs/swagger.json
docker run \
--rm -it \
--user "$$(id -u):$$(id -g)" \
-e GOPATH=$$HOME/go:/go \
-v $$HOME:$$HOME \
-w $$(pwd) quay.io/goswagger/swagger \
generate client -f ./swagger.json -t pkg/paastaapi
@echo "Due to bug in goswagger you may need to add an import for paastaapi/client/operations"
@echo "in pkg/paastaapi/client/paasta_client.go, run 'go build ./...' to check."
@echo
@echo "Do not forget to 'git add' and 'git commit' updated swagger.json and paasta-api"
7 changes: 6 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ require (
github.com/dlespiau/kube-test-harness v0.0.0-20190930170435-ec3f93e1a754
github.com/fatih/structs v1.1.0
github.com/go-logr/zapr v0.1.1 // indirect
github.com/go-openapi/errors v0.19.4
github.com/go-openapi/runtime v0.19.15
github.com/go-openapi/strfmt v0.19.5
github.com/go-openapi/swag v0.19.5
github.com/go-openapi/validate v0.19.8
github.com/gogo/protobuf v1.2.1 // indirect
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 // indirect
github.com/hashicorp/golang-lru v0.5.3 // indirect
Expand All @@ -22,7 +27,7 @@ require (
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 // indirect
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 // indirect
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
gopkg.in/yaml.v2 v2.2.2
gopkg.in/yaml.v2 v2.2.4
k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b
k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d
k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible
Expand Down
107 changes: 107 additions & 0 deletions go.sum

Large diffs are not rendered by default.

108 changes: 108 additions & 0 deletions pkg/paastaapi/client/autoscaler/autoscaler_client.go

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

156 changes: 156 additions & 0 deletions pkg/paastaapi/client/autoscaler/get_autoscaler_count_parameters.go

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

Loading

0 comments on commit 5074eaf

Please sign in to comment.