-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add hack script to generare reference docs for the Antrea API #1507
Add hack script to generare reference docs for the Antrea API #1507
Conversation
Thanks for your PR. The following commands are available:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I do not know much about the tool though.
# limitations under the License. | ||
|
||
# This script is used to generate the reference docs for the Antrea API, which | ||
# is included in the Antrea website. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"antrea.io website"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
{{ safe (renderComments .CommentLines) }} | ||
|
||
{{ if and (eq (.Type.Name.Name) "ObjectMeta") }} | ||
Refer to the Kubernetes API documentation for the fields of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this text looks like something that is K8s API doc related.. im not sure how and where this is used though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for the delay, what's your question?
I didn't write this file, I copied it from https://github.com/ahmetb/gen-crd-api-reference-docs as it seems to be how it's meant to be used. My understanding is that this specific part generates a generic description for the ObjectMeta
fields in API resources. See https://antrea.io/docs/master/api-reference/.
Generated documentation is then included on the Antrea website. The script relies on a slightly modified version of https://github.com/ahmetb/gen-crd-api-reference-docs. It doesn't require running an actual apiserver, instead it uses the Go source files directly.
1b9275a
to
50d6ad7
Compare
Codecov Report
@@ Coverage Diff @@
## master #1507 +/- ##
==========================================
- Coverage 63.31% 62.03% -1.29%
==========================================
Files 170 181 +11
Lines 14250 15300 +1050
==========================================
+ Hits 9023 9492 +469
- Misses 4292 4790 +498
- Partials 935 1018 +83
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/skip-all |
Generated documentation is then included on the Antrea website. The script relies on a slightly modified version of https://github.com/ahmetb/gen-crd-api-reference-docs. It doesn't require running an actual apiserver, instead it uses the Go source files directly.
Generated documentation is then included on the Antrea website.
The script relies on a slightly modified version of
https://github.com/ahmetb/gen-crd-api-reference-docs. It doesn't require
running an actual apiserver, instead it uses the Go source files
directly.