-
Notifications
You must be signed in to change notification settings - Fork 178
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
Generate API docs #1541
Generate API docs #1541
Conversation
5425578
to
17ca93a
Compare
Two questions before I go into reviewing this:
Couldn't it be handled similarly to how https://github.com/kubernetes-sigs/reference-docs/tree/master/gen-resourcesdocs handles it? |
We need the RST directives so embedding it in markdown just makes it harder or possibly bumping into "convertor" issues. Some like toc may not be even supported there. That said, it's limited to the templates.
I think we'll eventually use a similar generator from GoType, I didn't realize CRDs lack some of the information initially and this was quick to get. I'd like it to be slightly less manually but will see when I do v2 on types one day. (You can cut this PR some slack as we'll eventually replace it.) |
toc is supported - mystparser docs are dogfooding https://github.com/executablebooks/MyST-Parser/blob/master/docs/index.md. Having said that our indexes are still in rst so not an issue, this can be converted later, I was just curious if there was a known blocker. I'd personally rather see all our docs in markdown than the other way round but let's not get into this here. |
Good, I am fine if this eventually reconciles one way or the other, if we decide to unify the rest. If we sort it out for the rest, the templates are easy to switch. |
@rzetelskik gentle ping |
on it ;) |
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.
I think they selectively inline some definitions and the others. This is tricky and you may end up defining some multiple times. I'd rather not go into it here. |
#1546 (comment) |
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.
one more comment, other than that lgtm
/assign zimnx
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rzetelskik, tnozicka The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@rzetelskik based on your previous comment (and resolving the referenced nit) I suppose this is now only awaiting your official tag? |
/unassign zimnx |
Description of your changes:
The PR add a tool (
gen-api-reference
) that can generate API docs from CRDs. While it has it's quirks, like the inlined objects from other or the same API group, it is marginally better then not having to the docs at all. Compared to native Swagger/OpenAPI this is aware of API groups and versions.The next step would be to generate the docs base on Golang types that don't inline referenced objects but this still gets us 95% of the way and with the internal links to objects it's quite usable.
Which issue is resolved by this Pull Request:
Resolves #1526