Open shinmog opened 1 year ago
Hi there @shinmog 👋🏻 , thanks for submitting this issue!
This is related to both #156 and https://github.com/hashicorp/terraform-plugin-framework/issues/625#issuecomment-1424690927, in that it has the similar constraint of the current design of terraform-plugin-docs
. We don't currently have a clear path for solving this issue yet and I'll try to give more context as to why.
The current terraform-plugin-docs
tool is dependent on using Terraform CLI's terraform providers schema -json
output. This dependency restricts us in what we can easily change to provide richer documentation for providers today (such as the validator descriptions), as we can only utilize Description
and MarkdownDescrption
of the Resources/DataSources/Providers. To reference another similar request that has a more detailed answer here, our next step is to move away from this dependency by providing richer schema information directly from the provider itself (that format/process is still TBD, but the implementation would be in the new terraform-plugin-framework).
Apologies that this might not be the answer you're looking for, but hopefully it gives you useful context into how we're planning on approaching the problem.
I'm pretty sure that terraform-plugin-docs adds the validator docstrings to a param's docstring when the provider is built using SDKv2, but this is not happening for my provider built using terraform-plugin-framework. I would like it if terraform-plugin-docs would add in the validator docstrings to params when the provider is using terraform-plugin-framework, as all of the docstrings are already present on terraform-plugin-framework-validators.