-
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
SchemaMarkdown contains wrong nested attribute titles #285
Milestone
Comments
sebhoss
added a commit
to sebhoss/terraform-plugin-docs
that referenced
this issue
Mar 30, 2024
Fixes hashicorp#285 Signed-off-by: Sebastian Hoß <[email protected]>
sebhoss
added a commit
to sebhoss/terraform-plugin-docs
that referenced
this issue
Mar 30, 2024
Fixes hashicorp#285 Signed-off-by: Sebastian Hoß <[email protected]>
sebhoss
added a commit
to sebhoss/terraform-plugin-docs
that referenced
this issue
Apr 5, 2024
Fixes hashicorp#285 Signed-off-by: Sebastian Hoß <[email protected]>
SBGoods
added a commit
that referenced
this issue
Apr 10, 2024
* calc path in title next to anchorID Fixes #285 Signed-off-by: Sebastian Hoß <[email protected]> * Add nested block `schema-json` acceptance test * Add changelog entry --------- Signed-off-by: Sebastian Hoß <[email protected]> Co-authored-by: Selena Goods <[email protected]>
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The generated schema information contains anchors in the form of
<a id="nestedatt--..."></a>
which are immediately followed by a markdown title in the form of### Nested Schema for ...
. My expectation is that the attribute path in anchors match the attribute path in titles they precede but this does not seem to be the case. Instead the titles might contain the attribute path of a different attribute which is confusing for users.I have an example generated with the latest version of tfplugindocs at https://github.com/metio/terraform-provider-k8s/blob/development/docs/data-sources/external_secrets_io_cluster_secret_store_v1alpha1_manifest.md?plain=1#L684-L709 showing the problem: The anchor
nestedatt--spec--provider--oracle--auth--secret_ref--fingerprint
is followed by a title pointing tospec.provider.oracle.auth.secret_ref.privatekey
which is another attribute. In this case, the nested attributes offingerprint
andprivatekey
are exactly the same. The code for them is at https://github.com/metio/terraform-provider-k8s/blob/development/internal/provider/external_secrets_io_v1alpha1/external_secrets_io_secret_store_v1alpha1_manifest.go#L1891-L1955.I've created a small test case at https://github.com/metio/terraform-provider-k8s/blob/development/internal/provider/provider_test.go#L23-L46 for that document and it shows multiple mismatches:
I'm not sure if this is a wrong expectation on my end, some problem with the schema of that provider or a bug in tfplugindocs, so any feedback is highly appreciated!
The text was updated successfully, but these errors were encountered: