Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
ddb7b540
Commit
ddb7b540
authored
Apr 16, 2016
by
Clayton Coleman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure a newline at the end of all API docs
parent
e16a7f24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
update-swagger-spec.sh
hack/after-build/update-swagger-spec.sh
+9
-9
No files found.
hack/after-build/update-swagger-spec.sh
View file @
ddb7b540
...
@@ -72,7 +72,7 @@ VERSIONS=${VERSIONS:-$DEFAULT_GROUP_VERSIONS}
...
@@ -72,7 +72,7 @@ VERSIONS=${VERSIONS:-$DEFAULT_GROUP_VERSIONS}
kube::log::status
"Updating "
${
SWAGGER_ROOT_DIR
}
kube::log::status
"Updating "
${
SWAGGER_ROOT_DIR
}
for
ver
in
${
VERSIONS
}
;
do
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
if
[[
${
ver
}
==
"v1"
]]
;
then
SUBPATH
=
"api"
SUBPATH
=
"api"
else
else
...
@@ -80,22 +80,22 @@ for ver in ${VERSIONS}; do
...
@@ -80,22 +80,22 @@ 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
continue
continue
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment