Skip to content

Commit 9fe4437

Browse files
sapktechknowlogick
authored andcommitted
Use vendored go-swagger (#8087)
* Use vendored go-swagger * vendor go-swagger * revert un wanteed change * remove un-needed GO111MODULE * Update Makefile Co-Authored-By: techknowlogick <[email protected]>
1 parent 4cb1bdd commit 9fe4437

File tree

686 files changed

+143379
-17
lines changed

Some content is hidden

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

686 files changed

+143379
-17
lines changed

Makefile

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ TAGS ?=
4848

4949
TMPDIR := $(shell mktemp -d 2>/dev/null || mktemp -d -t 'gitea-temp')
5050

51+
#To update swagger use: GO111MODULE=on go get -u github.com/go-swagger/go-swagger/cmd/[email protected]
52+
SWAGGER := GO111MODULE=on $(GO) run -mod=vendor github.com/go-swagger/go-swagger/cmd/swagger
5153
SWAGGER_SPEC := templates/swagger/v1_json.tmpl
5254
SWAGGER_SPEC_S_TMPL := s|"basePath": *"/api/v1"|"basePath": "{{AppSubUrl}}/api/v1"|g
5355
SWAGGER_SPEC_S_JSON := s|"basePath": *"{{AppSubUrl}}/api/v1"|"basePath": "/api/v1"|g
@@ -101,10 +103,7 @@ generate:
101103

102104
.PHONY: generate-swagger
103105
generate-swagger:
104-
@hash swagger > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
105-
GO111MODULE="on" $(GO) get -u github.com/go-swagger/go-swagger/cmd/[email protected]; \
106-
fi
107-
swagger generate spec -o './$(SWAGGER_SPEC)'
106+
$(SWAGGER) generate spec -o './$(SWAGGER_SPEC)'
108107
$(SED_INPLACE) '$(SWAGGER_SPEC_S_TMPL)' './$(SWAGGER_SPEC)'
109108
$(SED_INPLACE) $(SWAGGER_NEWLINE_COMMAND) './$(SWAGGER_SPEC)'
110109

@@ -119,11 +118,8 @@ swagger-check: generate-swagger
119118

120119
.PHONY: swagger-validate
121120
swagger-validate:
122-
@hash swagger > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
123-
GO111MODULE="on" $(GO) get -u github.com/go-swagger/go-swagger/cmd/[email protected]; \
124-
fi
125121
$(SED_INPLACE) '$(SWAGGER_SPEC_S_JSON)' './$(SWAGGER_SPEC)'
126-
swagger validate './$(SWAGGER_SPEC)'
122+
$(SWAGGER) validate './$(SWAGGER_SPEC)'
127123
$(SED_INPLACE) '$(SWAGGER_SPEC_S_TMPL)' './$(SWAGGER_SPEC)'
128124

129125
.PHONY: errcheck

go.mod

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module code.gitea.io/gitea
33
go 1.12
44

55
require (
6+
cloud.google.com/go v0.45.0 // indirect
67
gitea.com/macaron/binding v0.0.0-20190822013154-a5f53841ed2b
78
gitea.com/macaron/cache v0.0.0-20190822004001-a6e7fee4ee76
89
gitea.com/macaron/captcha v0.0.0-20190822015246-daa973478bae
@@ -44,10 +45,10 @@ require (
4445
github.com/glycerine/goconvey v0.0.0-20190315024820-982ee783a72e // indirect
4546
github.com/go-redis/redis v6.15.2+incompatible
4647
github.com/go-sql-driver/mysql v1.4.1
48+
github.com/go-swagger/go-swagger v0.20.1
4749
github.com/go-xorm/xorm v0.7.7-0.20190822154023-17592d96b35b
4850
github.com/gogits/chardet v0.0.0-20150115103509-2404f7772561
4951
github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14
50-
github.com/golang/snappy v0.0.1 // indirect
5152
github.com/google/go-github/v24 v24.0.1
5253
github.com/gorilla/context v1.1.1
5354
github.com/issue9/assert v1.3.2 // indirect
@@ -79,7 +80,6 @@ require (
7980
github.com/philhofer/fwd v1.0.0 // indirect
8081
github.com/pquerna/otp v0.0.0-20160912161815-54653902c20e
8182
github.com/prometheus/client_golang v1.1.0
82-
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 // indirect
8383
github.com/prometheus/procfs v0.0.4 // indirect
8484
github.com/remyoudompheng/bigfft v0.0.0-20190321074620-2f0d2b0e0001 // indirect
8585
github.com/russross/blackfriday v0.0.0-20180428102519-11635eb403ff
@@ -101,11 +101,10 @@ require (
101101
github.com/urfave/cli v1.20.0
102102
github.com/willf/bitset v0.0.0-20180426185212-8ce1146b8621 // indirect
103103
github.com/yohcop/openid-go v0.0.0-20160914080427-2c050d2dae53
104-
go.etcd.io/bbolt v1.3.3 // indirect
105104
golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472
106105
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297
107106
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
108-
golang.org/x/sys v0.0.0-20190904005037-43c01164e931
107+
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd
109108
golang.org/x/text v0.3.2
110109
golang.org/x/tools v0.0.0-20190903163617-be0da057c5e3 // indirect
111110
google.golang.org/appengine v1.6.2 // indirect

go.sum

Lines changed: 205 additions & 2 deletions
Large diffs are not rendered by default.

tools.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright 2019 The Gitea Authors. All rights reserved.
2+
// Use of this source code is governed by a MIT-style
3+
// license that can be found in the LICENSE file.
4+
// +build tools
5+
6+
package tools
7+
8+
import (
9+
_ "github.com/go-swagger/go-swagger/cmd/swagger"
10+
)

vendor/github.com/PuerkitoBio/purell/.gitignore

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

vendor/github.com/PuerkitoBio/purell/.travis.yml

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

vendor/github.com/PuerkitoBio/purell/LICENSE

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

vendor/github.com/PuerkitoBio/purell/README.md

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

0 commit comments

Comments
 (0)