-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Module Markdown Optional Fields #334
base: main
Are you sure you want to change the base?
Conversation
238c3e6
to
c01dd54
Compare
b4ba461
to
d6d05d7
Compare
@stefanprodan with some feedback from the cue team I've gotten this so it now will print the definition of the field, see the README for the blueprints starter module. I want to refine the module so that name and namespace are not output, but wanted to bring it to your attention. |
I'm still not getting what I want from the labels and annotations though :/ |
7700382
to
4b853ab
Compare
4b853ab
to
96e8f5b
Compare
I have pulled and rebased the latest main, this behaves in the same way. I think the changes here are worth merging, I'll spend some time digging into cue releases since the initial work on this and see if I can get the result I initially wanted for annotations and labels. |
Hey @Nalum with this we remove the |
I removed it because the type information have use the type and the default in one result, Do you want to hold off on merging this for now so? |
Ah I think the goal was to show the cue type information as is. For example if we just had the type and default this would not show you the possible values: | `test: startupAPICheck: service: type:` | `*"ClusterIP" \| "NodePort" \| "LoadBalancer" \| "ExternalName"` | You would have this instead: | `test: startupAPICheck: service: type:` | `string` | `ClusterIP` | |
I guess this adds a requirement to understand cue syntax 🤔 |
Refactor code so we are not passing in values and only using the defaults from the module config Show parent field if there are no child fields to show We want to show the labels field (among others) in the markdown table if so that it is part of the documentation rather than showing all the preset labels as individual fields in the docs. Update schema with +nodoc tags and copy to blueprint starter module Hide certain fields This change brings the output more inline with the definition Update output to remove default column Commit updated test data Update nodoc behaviour Update structure to accomodate nodoc Signed-off-by: Luke Mallon (Nalum) <[email protected]>
a3146d4
to
f44efe5
Compare
Based on feedback in cue-lang/cue#2783 this PR updates the Markdown document generation to pull the optional fields into the table data. This is done via the
cue.Value.Fields()
iterator.