Treat empty blocks with MinItems == 0 as optional#99
Closed
ovandriyanov wants to merge 2 commits intohashicorp:mainfrom
Closed
Treat empty blocks with MinItems == 0 as optional#99ovandriyanov wants to merge 2 commits intohashicorp:mainfrom
ovandriyanov wants to merge 2 commits intohashicorp:mainfrom
Conversation
Contributor
Merge origin
detro
approved these changes
Apr 26, 2022
detro
suggested changes
Apr 26, 2022
Contributor
detro
left a comment
There was a problem hiding this comment.
Sorry, erroneous approval.
This is good, but we need BUG FIXES entry added to the CHANGELOG
Contributor
|
Sorry, I think I should have been more explicit. The changelog format is defined here https://www.terraform.io/plugin/sdkv2/best-practices/versioning#changelog-specification . Your change will be part of |
detro
pushed a commit
that referenced
this pull request
May 3, 2022
detro
pushed a commit
that referenced
this pull request
May 3, 2022
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch allows for generating documentation for those providers which have empty objects in their schema, i.e, the objects with no attributes and no nested blocks.
Terraform allows providers to have empty objects in their schema, but currently terraform-plugin-docs does not recognize such empty fields neither as required, nor optional, nor read-only, and thus cannot generate docs for such providers and raises an error like the following:
Fix it by handling such empty blocks explicitly.
Closes #100