-
Notifications
You must be signed in to change notification settings - Fork 345
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
See #2898 Generate CRD API docs as AsciiDoc #2899
Conversation
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.
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.
Great job @djencks !!
I only wonder if we can have a better format of the right side menu.
The RHS menu is a consequence of the generated sections from the templates. Can you suggest how you would like it better organized? I don't understand the reason some embedded members result in a link to a separate section and some result in a nested table. I think nested tables are generally a confusing way to present information and wonder if we should change the templates to always result in a link. What do you think? |
I also wonder if it would be a good idea to move all the kamelets documentation to the kamelets subproject, including the kamelets API. |
I rearranged the templates a bit so that the RHS menu makes more sense, and each package is on a separate page. Hopefully the preview will build and show the result. There's at least one link that doesn't quite work as expected due to the go array notation There are perhaps 4 xrefs from the kamelets api page to the camel-k api page. I wonder how appropriate this is since the idea seems to be to make kamelets rather independent of camel-k. Would it be a better idea to duplicate the common types in both packages? Before I fixed the references the errors were:
The encoding/json.Number errors were already present and I don't know how to fix them. |
1 similar comment
I rearranged the templates a bit so that the RHS menu makes more sense, and each package is on a separate page. Hopefully the preview will build and show the result. There's at least one link that doesn't quite work as expected due to the go array notation There are perhaps 4 xrefs from the kamelets api page to the camel-k api page. I wonder how appropriate this is since the idea seems to be to make kamelets rather independent of camel-k. Would it be a better idea to duplicate the common types in both packages? Before I fixed the references the errors were:
The encoding/json.Number errors were already present and I don't know how to fix them. |
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 could not see any new preview after your last changes to see how they appears now :(
4dcf7fa
to
cc44a57
Compare
There are links from the kamelets page to the camel-k page: Under https://pr-761--camel.netlify.app/camel-k/next/apis/kamelets.html#_camel_apache_org_v1alpha1_KameletSpec (and the embedded table earlier): SourceSpec Under https://pr-761--camel.netlify.app/camel-k/next/apis/kamelets.html#_camel_apache_org_v1alpha1_KameletBindingSpec (and earlier embedded table) IntegrationSpec Can we remove the deprecated Flow and copy the SourceSpec and IntegrationSpec to v1alpha1 and move Template to v1alpha1? I wonder if there's an error around RawMessage. There's a RawMessage type in both v1 and v1alpha1. These use v1.RawMessage: This uses v1alpha1.RawMessage: Can these all use the v1alpha1 RawMessage? |
I'd like to prepare a version without nested tables. I guess the practical way to do this is to have both versions on the same generated page. |
I agree, we should get rid off those nested tables. I also suggest to try to find a way to only show the "resource types" on the right side menu, hiding (only from the menu) the "internal types". We may even try removing that menu at all, we don't have a very long API (at least, the main types). About moving stuff between versions, it's not doable. We may have some duplicated stuff, due to the fact that each version should be independent (cannot declare both |
I've fixed all the problems I'm aware of in the generator and simplified the templates a bit and like the results. With luck we'll have a preview shortly. I think all the links from kamelets (v1alpha1) to camel-k (v1) work and look correct now. I don't think it's a good idea to hide the "internal types", why do you think we should? |
For simplicity while browsing the API list not to overwhelm visually. However, that's not very important, let's wait for the final result in the preview. |
I did a full build for other reasons and discovered the typo fixes propagate to several other files. |
Looks good for me either. Thanks for taking care of it! |
propagate typo fixes to generated yaml
8d6c392
to
8915a82
Compare
add /github.com to .gitignore, it's similar to /vendor use AsciiDoc API templates
Generated AsciiDoc API docs
8915a82
to
46887c6
Compare
See #2898.
This presumably needs more work.
go run
. I think this is a good idea in any case, it will work on any system and doesn't need WGET which I can't get to work on my mac.