mirror of
https://github.com/containers/podman.git
synced 2026-10-29 05:09:51 -04:00
Update the generated Swagger specification so that Libpod API paths include the required version prefix. Keep the unversioned ping endpoint unchanged, reuse the version path parameter, and add tests for the path rewriting logic. Fixes: #15376 Signed-off-by: JJordan0K <69581081+JJordan0C@users.noreply.github.com>
19 lines
702 B
Makefile
19 lines
702 B
Makefile
SWAGGER_OUT ?= swagger.yaml
|
|
SWAGGER_TMP = ${SWAGGER_OUT}.tmp.yaml
|
|
|
|
SWAGGER ?= ../../test/tools/build/swagger
|
|
|
|
validate: ${SWAGGER_OUT}
|
|
$(SWAGGER) validate ${SWAGGER_OUT}
|
|
|
|
serve: ${SWAGGER_OUT}
|
|
$(SWAGGER) serve -F redoc -p=8080 swagger.yaml
|
|
|
|
.PHONY: ${SWAGGER_OUT}
|
|
${SWAGGER_OUT}:
|
|
# generate doesn't remove file on error
|
|
rm -f ${SWAGGER_OUT} ${SWAGGER_TMP}
|
|
$(SWAGGER) generate spec -c go.podman.io/podman -x github.com/sigstore/rekor -x github.com/moby/moby/api/types/network -x github.com/docker/docker/api/types/network -x github.com/moby/moby/api -o ${SWAGGER_TMP} -i tags.yaml -w ./ -m
|
|
go run ../../hack/swagger-version-paths -input ${SWAGGER_TMP} -output ${SWAGGER_OUT}
|
|
rm -f ${SWAGGER_TMP}
|