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

[BugFix: Issue #265] Add deterministic order for resources and data sources rendered with the OpenAPI Terraform Documentation Renderer #267

Merged
merged 4 commits into from
Sep 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkg/terraformdocsgenerator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ $ go run main.go

The program will generate the Terraform documentation (in html format) for the sample swagger file and save the output locally. An example of the output: [example_provider_documentation_output.html](https://github.com/dikhan/terraform-provider-openapi/blob/master/pkg/terraformdocsgenerator/example_provider_documentation_output.html).

Note: The rendered resources and data sources are ordered alphabetically and should be deterministic, meaning that multiple
executions of the terraform docs generator for a given OpenAPI document would result into the exact same documentation being rendered.
However the order in which the endpoints are described in the OpenAPI document may not necessarily match the order of the
corresponding rendered resources and data sources. Also, it is important to note that if the OpenAPI document is updated with new endpoints that are
terraform compatible the order of the resources and data sources rendered might also change.

## Customizing the output documentation
You can customize sections of the documentation by overriding the default content used by `GenerateDocumentation()` before calling `RenderHTML()`.

Expand Down
Loading