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
6d75c01b
Commit
6d75c01b
authored
Jun 20, 2016
by
Dr. Stefan Schimanski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix hack/update-api-reference-docs.sh
- update toplevel api object pattern in swagger doc script - make hack/update-api-reference-docs.sh indepenent from master
parent
a055c4e8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
26 deletions
+14
-26
definitions.html
docs/api-reference/extensions/v1beta1/definitions.html
+3
-3
Dockerfile
hack/gen-swagger-doc/Dockerfile
+5
-5
gen-swagger-docs.sh
hack/gen-swagger-doc/gen-swagger-docs.sh
+1
-12
update-api-reference-docs.sh
hack/update-api-reference-docs.sh
+5
-6
No files found.
docs/api-reference/extensions/v1beta1/definitions.html
View file @
6d75c01b
...
...
@@ -400,10 +400,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<p><a
href=
"#_v1beta1_thirdpartyresourcelist"
>
v1beta1.ThirdPartyResourceList
</a></p>
</li>
<li>
<p><a
href=
"#_v1beta1_daemonset
"
>
v1beta1.DaemonSe
t
</a></p>
<p><a
href=
"#_v1beta1_daemonset
list"
>
v1beta1.DaemonSetLis
t
</a></p>
</li>
<li>
<p><a
href=
"#_v1beta1_daemonset
list"
>
v1beta1.DaemonSetLis
t
</a></p>
<p><a
href=
"#_v1beta1_daemonset
"
>
v1beta1.DaemonSe
t
</a></p>
</li>
<li>
<p><a
href=
"#_v1beta1_ingress"
>
v1beta1.Ingress
</a></p>
...
...
@@ -6093,7 +6093,7 @@ Both these may change in the future. Incoming requests are matched against the h
</div>
<div
id=
"footer"
>
<div
id=
"footer-text"
>
Last updated 2016-06-
06 17:05:19
UTC
Last updated 2016-06-
20 07:50:53
UTC
</div>
</div>
</body>
...
...
hack/gen-swagger-doc/Dockerfile
View file @
6d75c01b
...
...
@@ -28,12 +28,12 @@ COPY build.gradle build/
COPY
gen-swagger-docs.sh build/
#run the script once to download the dependent java libraries into the image
RUN
mkdir
/output
RUN
mkdir
/swagger-source
RUN
mkdir
/output /swagger-source
RUN
wget https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/swagger-spec/v1.json
-O
/swagger-source/v1.json
RUN
build/gen-swagger-docs.sh v1 https://raw.githubusercontent.com/GoogleCloudPlatform/kubernetes/master/pkg/api/v1/register.go
RUN
rm
/output/
*
RUN
rm
/swagger-source/
*
RUN
wget https://raw.githubusercontent.com/GoogleCloudPlatform/kubernetes/master/pkg/api/v1/register.go
-O
/register.go
RUN
build/gen-swagger-docs.sh v1
RUN
rm
/output/
*
/swagger-source/
*
/register.go
RUN
chmod
-R
777 build/
RUN
chmod
-R
777 gradle-cache/
...
...
hack/gen-swagger-doc/gen-swagger-docs.sh
View file @
6d75c01b
...
...
@@ -22,16 +22,6 @@ set -o pipefail
cd
/build
# wget doesn't retry on 503, so adding a loop to make it more resilient.
for
i
in
{
1..3
}
;
do
if
wget
"
$2
"
-O
register.go
;
then
break
fi
if
[
$i
-eq
3
]
;
then
exit
1
fi
done
# gendocs takes "input.json" as the input swagger spec.
# $1 is expected to be <group>_<version>
cp
/swagger-source/
"
$1
"
.json input.json
...
...
@@ -40,8 +30,7 @@ cp /swagger-source/"$1".json input.json
#insert a TOC for top level API objects
buf
=
"== Top Level API Objects
\n\n
"
top_level_models
=
$(
grep
GetObjectKind ./register.go |
sed
's/func (obj \*\(.*\)) GetObjectKind(\(.*\)) .*/\1/g'
\
|
tr
-d
'()'
|
tr
-d
'{}'
|
tr
-d
' '
)
top_level_models
=
$(
grep
'&[A-Za-z]*{},'
/register.go |
sed
's/.*&//;s/{},//'
)
# check if the top level models exist in the definitions.adoc. If they exist,
# their name will be <version>.<model_name>
...
...
hack/update-api-reference-docs.sh
View file @
6d75c01b
...
...
@@ -60,20 +60,19 @@ fi
for
ver
in
$VERSIONS
;
do
TMP_IN_HOST
=
"
${
OUTPUT_TMP_IN_HOST
}
/
${
ver
}
"
REGISTER_FILE_URL
=
"https://raw.githubusercontent.com/kubernetes/kubernetes/master/pkg"
if
[[
${
ver
}
==
"v1"
]]
;
then
REGISTER_FILE
_URL
=
"
${
REGISTER_FILE_URL
}
/api/
${
ver
}
/register.go"
REGISTER_FILE
=
"
${
REPO_DIR
}
/pkg
/api/
${
ver
}
/register.go"
else
REGISTER_FILE
_URL
=
"
${
REGISTER_FILE_URL
}
/apis/
${
ver
}
/register.go"
REGISTER_FILE
=
"
${
REPO_DIR
}
/pkg
/apis/
${
ver
}
/register.go"
fi
SWAGGER_JSON_NAME
=
"
$(
kube::util::gv-to-swagger-name
"
${
ver
}
"
)
"
docker run
${
user_flags
}
\
--rm
-v
"
${
TMP_IN_HOST
}
"
:/output:z
\
-v
"
${
SWAGGER_PATH
}
"
:/swagger-source:z
\
gcr.io/google_containers/gen-swagger-docs:v5
\
"
${
SWAGGER_JSON_NAME
}
"
\
"
${
REGISTER_FILE_URL
}
"
-v
"
${
REGISTER_FILE
}
"
:/register.go:z
\
gcr.io/google_containers/gen-swagger-docs:v6
\
"
${
SWAGGER_JSON_NAME
}
"
done
# Check if we actually changed anything
...
...
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