From ddb7b540067b9d6fc902af201db1892d0afb8bd3 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Sat, 16 Apr 2016 01:16:34 -0400 Subject: [PATCH] Ensure a newline at the end of all API docs --- hack/after-build/update-swagger-spec.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hack/after-build/update-swagger-spec.sh b/hack/after-build/update-swagger-spec.sh index 91c8771f7f1..680ea8ae904 100755 --- a/hack/after-build/update-swagger-spec.sh +++ b/hack/after-build/update-swagger-spec.sh @@ -72,7 +72,7 @@ VERSIONS=${VERSIONS:-$DEFAULT_GROUP_VERSIONS} kube::log::status "Updating " ${SWAGGER_ROOT_DIR} for ver in ${VERSIONS}; do - # fetch the swagger spec for each group version. + # fetch the swagger spec for each group version. if [[ ${ver} == "v1" ]]; then SUBPATH="api" else @@ -80,22 +80,22 @@ for ver in ${VERSIONS}; do fi SUBPATH="${SUBPATH}/${ver}" 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. if [[ ${ver} == "v1" ]]; then - continue + continue fi SUBPATH="apis/"${ver%/*} 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 # fetch swagger specs for other discovery mechanism. -curl -fs "${SWAGGER_API_PATH}" > "${SWAGGER_ROOT_DIR}/resourceListing.json" -curl -fs "${SWAGGER_API_PATH}version" > "${SWAGGER_ROOT_DIR}/version.json" -curl -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}" > "${SWAGGER_ROOT_DIR}/resourceListing.json" +curl -w "\n" -fs "${SWAGGER_API_PATH}version" > "${SWAGGER_ROOT_DIR}/version.json" +curl -w "\n" -fs "${SWAGGER_API_PATH}api" > "${SWAGGER_ROOT_DIR}/api.json" +curl -w "\n" -fs "${SWAGGER_API_PATH}apis" > "${SWAGGER_ROOT_DIR}/apis.json" kube::log::status "SUCCESS" # ex: ts=2 sw=2 et filetype=sh