From 68896b18e579d70822543748a2f5d95a55daaca1 Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Thu, 16 Jan 2020 10:33:43 -0700 Subject: Update build images * Add swagger annotations for all the query and response parameters for buildimages * Improve populating the BuildOptions struct * Improve swagger.json generation, removing tags.xml and move tag definiation into the swagger:meta block * Update Makefile to be more robust, added target for validation * TODO once validation passes add that step to the generation step Signed-off-by: Jhon Honce --- pkg/api/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'pkg/api/Makefile') diff --git a/pkg/api/Makefile b/pkg/api/Makefile index 8a1556800..915f0b9b3 100644 --- a/pkg/api/Makefile +++ b/pkg/api/Makefile @@ -2,6 +2,12 @@ export GO111MODULE=off SWAGGER_OUT ?= swagger.yaml -swagger: +.PHONY: ${SWAGGER_OUT} +${SWAGGER_OUT}: + # generate doesn't remove file on error + rm -f ${SWAGGER_OUT} swagger generate spec -o ${SWAGGER_OUT} -w ./ - cat tags.yaml >> swagger.yaml + +# TODO: when pass validation move it under swagger. +validate: + swagger validate ${SWAGGER_OUT} -- cgit v1.2.3-54-g00ecf