-
Notifications
You must be signed in to change notification settings - Fork 68
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
Descriptions for nested schemas are missing (inconsistent behaviour) #28
Comments
Interestingly this isn't consistent behaviour 🤔 The following nested schema data was getting the descriptions templated into the Markdown as we would have hoped...
The generated Markdown shows the Description field values are being used:
Also interesting is that it has been able to generate an adequate description for the 'read-only' ID field (which in the Schema was left with a blank string for its value) 🤔 |
The explanation for this goes in to Terraform internals. And just an aside, to debug you may want to start with running The key there is that this is a Object fields don't have metadata currently, so they can't contain attributes like description/sensitive, etc. We do have some thoughts on how to address this for document generation, basically decoupling the the generation from the schema JSON so that it can potentially have richer information supplied, but its probably a ways down the road at this point. |
Thanks @paultyng for the feedback/update 👍🏻 |
Also worth noting there is an ongoing internal project to look at normalizing these things so you don't have the trade-offs, if/when that lands we can update the SDK and generator to use it, but probably a ways out. Unfortunately for the time being this probably means you will have a few docs you'll need to write schema for by hand (or just |
@paultyng Thank you for the details. Is this work/effort being tracked anywhere I can follow along? |
I was about to ask the same, is there someone actively working on this? |
I was about to ask the same, is there someone actively working on this? |
There are two issues:
Description
field set on the parent Schema isn't displayed any where.Description
value pulled into the documentation.Here's an example schema that shows a
Description
field has been set on the top-level Schema:Yet when generating the documentation for this resource I discovered that description value is not present anywhere:
Here's an example schema definition with a nested schema under the 'rules' field:
In the generated schema output (see below example, from running
tfplugindocs generate
) we can see theDescription
fields from the top-levelSchema
types are included in the output, but the nested Schema Description fields are not included (see<MISSING DESCRIPTION>
)...The text was updated successfully, but these errors were encountered: