mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
Ensure a newline at the end of all API docs
This commit is contained in:
parent
e16a7f2421
commit
ddb7b54006
@ -80,7 +80,7 @@ for ver in ${VERSIONS}; do
|
|||||||
fi
|
fi
|
||||||
SUBPATH="${SUBPATH}/${ver}"
|
SUBPATH="${SUBPATH}/${ver}"
|
||||||
SWAGGER_JSON_NAME="$(kube::util::gv-to-swagger-name ${ver}).json"
|
SWAGGER_JSON_NAME="$(kube::util::gv-to-swagger-name ${ver}).json"
|
||||||
curl -fs "${SWAGGER_API_PATH}${SUBPATH}" > "${SWAGGER_ROOT_DIR}/${SWAGGER_JSON_NAME}"
|
curl -w "\n" -fs "${SWAGGER_API_PATH}${SUBPATH}" > "${SWAGGER_ROOT_DIR}/${SWAGGER_JSON_NAME}"
|
||||||
|
|
||||||
# fetch the swagger spec for the discovery mechanism at group level.
|
# fetch the swagger spec for the discovery mechanism at group level.
|
||||||
if [[ ${ver} == "v1" ]]; then
|
if [[ ${ver} == "v1" ]]; then
|
||||||
@ -88,14 +88,14 @@ for ver in ${VERSIONS}; do
|
|||||||
fi
|
fi
|
||||||
SUBPATH="apis/"${ver%/*}
|
SUBPATH="apis/"${ver%/*}
|
||||||
SWAGGER_JSON_NAME="${ver%/*}.json"
|
SWAGGER_JSON_NAME="${ver%/*}.json"
|
||||||
curl -fs "${SWAGGER_API_PATH}${SUBPATH}" > "${SWAGGER_ROOT_DIR}/${SWAGGER_JSON_NAME}"
|
curl -w "\n" -fs "${SWAGGER_API_PATH}${SUBPATH}" > "${SWAGGER_ROOT_DIR}/${SWAGGER_JSON_NAME}"
|
||||||
done
|
done
|
||||||
|
|
||||||
# fetch swagger specs for other discovery mechanism.
|
# fetch swagger specs for other discovery mechanism.
|
||||||
curl -fs "${SWAGGER_API_PATH}" > "${SWAGGER_ROOT_DIR}/resourceListing.json"
|
curl -w "\n" -fs "${SWAGGER_API_PATH}" > "${SWAGGER_ROOT_DIR}/resourceListing.json"
|
||||||
curl -fs "${SWAGGER_API_PATH}version" > "${SWAGGER_ROOT_DIR}/version.json"
|
curl -w "\n" -fs "${SWAGGER_API_PATH}version" > "${SWAGGER_ROOT_DIR}/version.json"
|
||||||
curl -fs "${SWAGGER_API_PATH}api" > "${SWAGGER_ROOT_DIR}/api.json"
|
curl -w "\n" -fs "${SWAGGER_API_PATH}api" > "${SWAGGER_ROOT_DIR}/api.json"
|
||||||
curl -fs "${SWAGGER_API_PATH}apis" > "${SWAGGER_ROOT_DIR}/apis.json"
|
curl -w "\n" -fs "${SWAGGER_API_PATH}apis" > "${SWAGGER_ROOT_DIR}/apis.json"
|
||||||
kube::log::status "SUCCESS"
|
kube::log::status "SUCCESS"
|
||||||
|
|
||||||
# ex: ts=2 sw=2 et filetype=sh
|
# ex: ts=2 sw=2 et filetype=sh
|
||||||
|
Loading…
Reference in New Issue
Block a user