Skip to content

Commit da4c216

Browse files
author
Marcus Weiner
authored
Merge pull request #200 from netlify/fix/go-generation
Fix Go client generation
2 parents 8e543ca + 0cb5a13 commit da4c216

File tree

102 files changed

+1541
-713
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+1541
-713
lines changed

.travis.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
language: go
33

44
go:
5-
- '1.12'
6-
env:
7-
global:
8-
- GO111MODULE=on
9-
- GOPROXY=https://proxy.golang.org
5+
- "1.13"
6+
107
install: make deps
118
script: make test
9+
1210
notifications:
1311
email: false

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ test: ## Test the go code.
2020
gobin -m -run github.com/kyoh86/richgo test -v $(CHECK_FILES)
2121

2222
validate: ## Check that the swagger spec is valid.
23-
gobin -m -run github.com/go-swagger/go-swagger/cmd/swagger validate $(SWAGGER_SPEC)
23+
gobin -m -run github.com/go-swagger/go-swagger/cmd/swagger@c49ea4ca2112a67af0faa06ffdc994b036860a0c validate $(SWAGGER_SPEC)

generate.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
package tools
22

3-
//go:generate gobin -m -run github.com/go-swagger/go-swagger/cmd/swagger generate client -A netlify -f swagger.yml -t go -c plumbing --with-flatten=full
3+
// todo: Find a better way to ignore tags or make a breaking release
4+
//go:generate gobin -m -run github.com/go-swagger/go-swagger/cmd/swagger flatten swagger.yml -o swagger_flat.json
5+
//go:generate sh -c "cat swagger_flat.json | jq '[., (.paths | map_values(.[] |= del(.tags?)) | {paths: .})] | add' > swagger_go.json"
6+
//go:generate gobin -m -run github.com/go-swagger/go-swagger/cmd/swagger generate client -A netlify -f swagger_go.json -t go -c plumbing --default-scheme=https

go.mod

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
module github.com/netlify/open-api
22

3-
go 1.12
3+
go 1.13
44

55
require (
66
contrib.go.opencensus.io/exporter/ocagent v0.4.12 // indirect
77
github.com/Azure/go-autorest v12.0.0+incompatible
88
github.com/cenkalti/backoff v2.1.1+incompatible
9-
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
10-
github.com/go-openapi/errors v0.19.0
11-
github.com/go-openapi/inflect v0.19.0 // indirect
12-
github.com/go-openapi/runtime v0.19.0
13-
github.com/go-openapi/strfmt v0.19.0
14-
github.com/go-openapi/swag v0.19.0
15-
github.com/go-openapi/validate v0.19.0
16-
github.com/go-swagger/go-swagger v0.19.0
17-
github.com/go-swagger/scan-repo-boundary v0.0.0-20180623220736-973b3573c013 // indirect
18-
github.com/gorilla/handlers v1.4.0 // indirect
19-
github.com/jessevdk/go-flags v1.4.0 // indirect
9+
github.com/go-openapi/errors v0.19.2
10+
github.com/go-openapi/runtime v0.19.5
11+
github.com/go-openapi/strfmt v0.19.3
12+
github.com/go-openapi/swag v0.19.5
13+
github.com/go-openapi/validate v0.19.3
14+
github.com/go-swagger/go-swagger v0.20.2-0.20190910212040-c49ea4ca2112
15+
github.com/grpc-ecosystem/grpc-gateway v1.9.6 // indirect
16+
github.com/hashicorp/golang-lru v0.5.3 // indirect
17+
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
2018
github.com/kyoh86/richgo v0.3.1
19+
github.com/myitcv/gobin v0.0.13 // indirect
20+
github.com/rogpeppe/go-internal v1.3.2 // indirect
2121
github.com/rsc/goversion v1.2.0
22-
github.com/sirupsen/logrus v1.4.1
23-
github.com/spf13/viper v1.3.2 // indirect
24-
github.com/stretchr/testify v1.3.0
25-
github.com/toqueteos/webbrowser v1.1.0 // indirect
26-
golang.org/x/net v0.0.0-20190415214537-1da14a5a36f2
27-
golang.org/x/tools v0.0.0-20190418235243-4796d4bd3df0 // indirect
22+
github.com/sirupsen/logrus v1.4.2
23+
github.com/stretchr/testify v1.4.0
24+
go.opencensus.io v0.22.0 // indirect
25+
google.golang.org/api v0.8.0 // indirect
26+
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 // indirect
27+
google.golang.org/grpc v1.23.0 // indirect
2828
)

go.sum

Lines changed: 193 additions & 26 deletions
Large diffs are not rendered by default.

go/models/repo_info.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/models/split_tests.go

Lines changed: 22 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/plumbing/operations/add_member_to_account_responses.go

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/plumbing/operations/cancel_account_responses.go

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/plumbing/operations/configure_dns_for_site_responses.go

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)