diff options
Diffstat (limited to 'pkg/api/Makefile')
-rw-r--r-- | pkg/api/Makefile | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/pkg/api/Makefile b/pkg/api/Makefile index 5fb4e7da5..f564b6516 100644 --- a/pkg/api/Makefile +++ b/pkg/api/Makefile @@ -1,3 +1,13 @@ -swagger: - swagger generate spec -o swagger.yaml -w ./ - cat tags.yaml >> swagger.yaml +export GO111MODULE=off + +SWAGGER_OUT ?= swagger.yaml + +validate: ${SWAGGER_OUT} + swagger validate ${SWAGGER_OUT} + +.PHONY: ${SWAGGER_OUT} +${SWAGGER_OUT}: + # generate doesn't remove file on error + rm -f ${SWAGGER_OUT} + swagger generate spec -o ${SWAGGER_OUT} -i tags.yaml -w ./ + |