File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -120,11 +120,12 @@ endif
120
120
121
121
GO_SOURCES_OWN := $(filter-out vendor/% % /bindata.go, $(GO_SOURCES ) )
122
122
123
- # To update swagger use: GO111MODULE=on go get -u github.com/go-swagger/go-swagger/cmd/swagger@v0.20.1
123
+ # To update swagger use: GO111MODULE=on go get -u github.com/go-swagger/go-swagger/cmd/swagger
124
124
SWAGGER := $(GO ) run -mod=vendor github.com/go-swagger/go-swagger/cmd/swagger
125
125
SWAGGER_SPEC := templates/swagger/v1_json.tmpl
126
126
SWAGGER_SPEC_S_TMPL := s|"basePath": *"/api/v1"|"basePath": "{{AppSubUrl}}/api/v1"|g
127
127
SWAGGER_SPEC_S_JSON := s|"basePath": *"{{AppSubUrl}}/api/v1"|"basePath": "/api/v1"|g
128
+ SWAGGER_EXCLUDE := code.gitea.io/sdk
128
129
SWAGGER_NEWLINE_COMMAND := -e '$$a\'
129
130
130
131
TEST_MYSQL_HOST ?= mysql:3306
@@ -240,7 +241,7 @@ endif
240
241
241
242
.PHONY : generate-swagger
242
243
generate-swagger :
243
- $(SWAGGER ) generate spec -o ' ./$(SWAGGER_SPEC)'
244
+ $(SWAGGER ) generate spec -x " $( SWAGGER_EXCLUDE ) " - o ' ./$(SWAGGER_SPEC)'
244
245
$(SED_INPLACE ) ' $(SWAGGER_SPEC_S_TMPL)' ' ./$(SWAGGER_SPEC)'
245
246
$(SED_INPLACE ) $(SWAGGER_NEWLINE_COMMAND ) ' ./$(SWAGGER_SPEC)'
246
247
You can’t perform that action at this time.
0 commit comments