Skip to content

Commit c4d8d53

Browse files
sapklafriks
authored andcommitted
Backport: Use vendored go-swagger (#8087) (#8165)
* 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]> * re-generate swagger file
1 parent 2f71571 commit c4d8d53

File tree

918 files changed

+168216
-9453
lines changed

Some content is hidden

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

918 files changed

+168216
-9453
lines changed

Makefile

+4-8
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-
$(GO) get -u github.com/go-swagger/go-swagger/cmd/swagger; \
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

+29-22
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ module code.gitea.io/gitea
33
go 1.12
44

55
require (
6-
github.com/BurntSushi/toml v0.3.1 // indirect
76
github.com/PuerkitoBio/goquery v0.0.0-20170324135448-ed7d758e9a34
87
github.com/RoaringBitmap/roaring v0.4.7 // indirect
98
github.com/Unknwon/cae v0.0.0-20160715032808-c6aac99ea2ca
@@ -17,18 +16,18 @@ require (
1716
github.com/blevesearch/go-porterstemmer v0.0.0-20141230013033-23a2c8e5cf1f // indirect
1817
github.com/blevesearch/segment v0.0.0-20160105220820-db70c57796cc // indirect
1918
github.com/boombuler/barcode v0.0.0-20161226211916-fe0f26ff6d26 // indirect
20-
github.com/bradfitz/gomemcache v0.0.0-20160117192205-fb1f79c6b65a // indirect
19+
github.com/bradfitz/gomemcache v0.0.0-20190329173943-551aad21a668 // indirect
2120
github.com/chaseadamsio/goorgeous v0.0.0-20170901132237-098da33fde5f
22-
github.com/couchbase/gomemcached v0.0.0-20181122193126-5125a94a666c // indirect
23-
github.com/couchbase/goutils v0.0.0-20180530154633-e865a1461c8a // indirect
21+
github.com/couchbase/gomemcached v0.0.0-20190515232915-c4b4ca0eb21d // indirect
22+
github.com/couchbase/goutils v0.0.0-20190315194238-f9d42b11473b // indirect
2423
github.com/couchbase/vellum v0.0.0-20190111184608-e91b68ff3efe // indirect
25-
github.com/couchbaselabs/go-couchbase v0.0.0-20190117181324-d904413d884d // indirect
24+
github.com/couchbaselabs/go-couchbase v0.0.0-20190708161019-23e7ca2ce2b7 // indirect
2625
github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d // indirect
2726
github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect
2827
github.com/cznic/strutil v0.0.0-20181122101858-275e90344537 // indirect
2928
github.com/denisenkom/go-mssqldb v0.0.0-20190121005146-b04fd42d9952
3029
github.com/dgrijalva/jwt-go v3.2.0+incompatible
31-
github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712 // indirect
30+
github.com/edsrzf/mmap-go v1.0.0 // indirect
3231
github.com/emirpasic/gods v1.12.0
3332
github.com/etcd-io/bbolt v1.3.2 // indirect
3433
github.com/ethantkoenig/rupture v0.0.0-20180203182544-0a76f03a811a
@@ -40,7 +39,7 @@ require (
4039
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect
4140
github.com/facebookgo/stats v0.0.0-20151006221625-1b76add642e4 // indirect
4241
github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 // indirect
43-
github.com/gliderlabs/ssh v0.1.4 // indirect
42+
github.com/gliderlabs/ssh v0.2.2 // indirect
4443
github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd // indirect
4544
github.com/glycerine/goconvey v0.0.0-20190315024820-982ee783a72e // indirect
4645
github.com/go-macaron/binding v0.0.0-20160711225916-9440f336b443
@@ -54,12 +53,13 @@ require (
5453
github.com/go-macaron/toolbox v0.0.0-20180818072302-a77f45a7ce90
5554
github.com/go-redis/redis v6.15.2+incompatible
5655
github.com/go-sql-driver/mysql v1.4.1
56+
github.com/go-swagger/go-swagger v0.20.1
5757
github.com/go-xorm/core v0.6.0 // indirect
5858
github.com/go-xorm/xorm v0.7.3-0.20190620151208-f1b4f8368459
5959
github.com/gogits/chardet v0.0.0-20150115103509-2404f7772561
6060
github.com/gogits/cron v0.0.0-20160810035002-7f3990acf183
61-
github.com/google/go-cmp v0.3.0 // indirect
6261
github.com/google/go-github/v24 v24.0.1
62+
github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c // indirect
6363
github.com/gorilla/context v1.1.1
6464
github.com/issue9/assert v1.3.2 // indirect
6565
github.com/issue9/identicon v0.0.0-20160320065130-d36b54562f4c
@@ -72,24 +72,29 @@ require (
7272
github.com/klauspost/cpuid v0.0.0-20160302075316-09cded8978dc // indirect
7373
github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6 // indirect
7474
github.com/lafriks/xormstore v1.0.0
75-
github.com/lib/pq v1.1.0
75+
github.com/lib/pq v1.2.0
7676
github.com/lunny/dingtalk_webhook v0.0.0-20171025031554-e3534c89ef96
7777
github.com/lunny/levelqueue v0.0.0-20190217115915-02b525a4418e
7878
github.com/lunny/log v0.0.0-20160921050905-7887c61bf0de // indirect
7979
github.com/lunny/nodb v0.0.0-20160621015157-fc1ef06ad4af // indirect
8080
github.com/markbates/goth v1.49.0
8181
github.com/mattn/go-isatty v0.0.7
8282
github.com/mattn/go-oci8 v0.0.0-20190320171441-14ba190cf52d // indirect
83-
github.com/mattn/go-sqlite3 v1.10.0
83+
github.com/mattn/go-sqlite3 v1.11.0
8484
github.com/mcuadros/go-version v0.0.0-20190308113854-92cdf37c5b75
8585
github.com/microcosm-cc/bluemonday v0.0.0-20161012083705-f77f16ffc87a
86+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
87+
github.com/modern-go/reflect2 v1.0.1 // indirect
8688
github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae // indirect
8789
github.com/msteinert/pam v0.0.0-20151204160544-02ccfbfaf0cc
8890
github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5
8991
github.com/oliamb/cutter v0.2.2
92+
github.com/onsi/ginkgo v1.8.0 // indirect
93+
github.com/onsi/gomega v1.5.0 // indirect
9094
github.com/philhofer/fwd v1.0.0 // indirect
9195
github.com/pquerna/otp v0.0.0-20160912161815-54653902c20e
92-
github.com/prometheus/client_golang v0.9.3
96+
github.com/prometheus/client_golang v1.1.0
97+
github.com/prometheus/procfs v0.0.4 // indirect
9398
github.com/remyoudompheng/bigfft v0.0.0-20190321074620-2f0d2b0e0001 // indirect
9499
github.com/russross/blackfriday v0.0.0-20180428102519-11635eb403ff
95100
github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca // indirect
@@ -99,36 +104,38 @@ require (
99104
github.com/shurcooL/sanitized_anchor_name v0.0.0-20160918041101-1dba4b3954bc // indirect
100105
github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd
101106
github.com/siddontang/go-snappy v0.0.0-20140704025258-d8f7bb82a96d // indirect
102-
github.com/smartystreets/goconvey v0.0.0-20190306220146-200a235640ff // indirect
107+
github.com/smartystreets/assertions v1.0.1 // indirect
108+
github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 // indirect
103109
github.com/steveyen/gtreap v0.0.0-20150807155958-0abe01ef9be2 // indirect
104-
github.com/stretchr/testify v1.3.0
110+
github.com/stretchr/testify v1.4.0
111+
github.com/syndtr/goleveldb v1.0.0 // indirect
105112
github.com/tecbot/gorocksdb v0.0.0-20181010114359-8752a9433481 // indirect
106113
github.com/tinylib/msgp v0.0.0-20180516164116-c8cf64dff200 // indirect
107114
github.com/tstranex/u2f v1.0.0
108115
github.com/urfave/cli v1.20.0
109116
github.com/willf/bitset v0.0.0-20180426185212-8ce1146b8621 // indirect
110117
github.com/yohcop/openid-go v0.0.0-20160914080427-2c050d2dae53
111-
go.etcd.io/bbolt v1.3.2 // indirect
112-
golang.org/x/crypto v0.0.0-20190618222545-ea8f1a30c443
113-
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980
114-
golang.org/x/oauth2 v0.0.0-20181101160152-c453e0c75759
115-
golang.org/x/sys v0.0.0-20190618155005-516e3c20635f
118+
golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472
119+
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297
120+
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
121+
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd
116122
golang.org/x/text v0.3.2
117-
golang.org/x/tools v0.0.0-20190618163018-fdf1049a943a // indirect
123+
golang.org/x/tools v0.0.0-20190903163617-be0da057c5e3 // indirect
124+
google.golang.org/appengine v1.6.2 // indirect
118125
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
119126
gopkg.in/asn1-ber.v1 v1.0.0-20150924051756-4e86f4367175 // indirect
120127
gopkg.in/bufio.v1 v1.0.0-20140618132640-567b2bfa514e // indirect
121-
gopkg.in/editorconfig/editorconfig-core-go.v1 v1.2.0
128+
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
129+
gopkg.in/editorconfig/editorconfig-core-go.v1 v1.3.0
122130
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
123-
gopkg.in/ini.v1 v1.42.0
131+
gopkg.in/ini.v1 v1.46.0
124132
gopkg.in/ldap.v3 v3.0.2
125133
gopkg.in/macaron.v1 v1.3.2
126134
gopkg.in/redis.v2 v2.3.2 // indirect
127135
gopkg.in/src-d/go-billy.v4 v4.3.0
128136
gopkg.in/src-d/go-git.v4 v4.12.0
129137
gopkg.in/stretchr/testify.v1 v1.2.2 // indirect
130138
gopkg.in/testfixtures.v2 v2.5.0
131-
gopkg.in/yaml.v2 v2.2.2 // indirect
132139
mvdan.cc/xurls/v2 v2.0.0
133140
strk.kbt.io/projects/go/libravatar v0.0.0-20160628055650-5eed7bff870a
134141
xorm.io/builder v0.3.5

0 commit comments

Comments
 (0)