Skip to content

Commit

Permalink
Add make command to validate swagger file (go-gitea#4096)
Browse files Browse the repository at this point in the history
Partial fix for go-gitea#4088
  • Loading branch information
Fluf authored and lafriks committed Jun 2, 2018
1 parent 0549762 commit 28fb255
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ swagger-check: generate-swagger
exit 1; \
fi;

.PHONY: swagger-validate
swagger-validate:
@hash swagger > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/go-swagger/go-swagger/cmd/swagger; \
fi
swagger validate ./public/swagger.v1.json

.PHONY: errcheck
errcheck:
@hash errcheck > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
Expand Down

0 comments on commit 28fb255

Please sign in to comment.