Skip to content
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

all: Fix various bugs related to resource type names that match the provider type name (i.e. no resource type suffix) #421

Merged
merged 7 commits into from
Nov 26, 2024

Conversation

austinvalle
Copy link
Member

@austinvalle austinvalle commented Nov 18, 2024

Closes #419

This PR fixes three bugs, two of which were related to resource type names that have no type name and are equal to the provider name itself, which is valid. (Example: http data source from the terraform-provider-http provider)

  1. In the validate command, resource types that had no type name would return a validation error for file mismatching
  2. In the generate command, resource types that had no type name would take priority over other files present, introduced in Allowing single word resources to use templates #147. I believe this was likely caused because we didn't have any providers that had multiple resources alongside a resource with a type name the same as the provider 🙃

The third bug was just related to static file copying from templates:

  1. In the generate command, static files which we wish to not overwrite in the destination should not cause the docs generator to throw an error.

Notes

  • This PR also removes the .vscode folder at the root of this project, since we don't typically include IDE files in repositories

@austinvalle austinvalle marked this pull request as ready for review November 18, 2024 17:55
@austinvalle austinvalle requested a review from a team as a code owner November 18, 2024 17:55
@austinvalle austinvalle added the bug Something isn't working label Nov 18, 2024
@austinvalle austinvalle merged commit 11fcc79 into main Nov 26, 2024
6 checks passed
@austinvalle austinvalle deleted the av/bug-fixes branch November 26, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to generate correct docs when one resource has same name as provider
2 participants