summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorFluf <36822577+flufmonster@users.noreply.github.com>2018-06-02 07:29:12 -0400
committerLauris BH <lauris@nix.lv>2018-06-02 14:29:12 +0300
commit28fb255d91dc4fef45f96773374b73d40320b2f3 (patch)
tree50da7cc3f4b4b2b9d6b6750f9a9a506124b1f209 /Makefile
parent0549762fd00a60d0d47380d67621f7076fc25c0f (diff)
downloadgitea-28fb255d91dc4fef45f96773374b73d40320b2f3.tar.gz
gitea-28fb255d91dc4fef45f96773374b73d40320b2f3.zip
Add make command to validate swagger file (#4096)
Partial fix for #4088
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 2dea0a9ea6..c052ebbb08 100644
--- a/Makefile
+++ b/Makefile
@@ -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 \