Add make command to validate swagger file

Partial fix for #4088
This commit is contained in:
Fluf 2018-06-01 12:23:57 -04:00 committed by GitHub
parent 2eabf18c9b
commit aa72e8c7f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 \