From 28fb255d91dc4fef45f96773374b73d40320b2f3 Mon Sep 17 00:00:00 2001 From: Fluf <36822577+flufmonster@users.noreply.github.com> Date: Sat, 2 Jun 2018 07:29:12 -0400 Subject: [PATCH] Add make command to validate swagger file (#4096) Partial fix for #4088 --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 2dea0a9ea..c052ebbb0 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 \