dikhan / terraform-provider-openapi

OpenAPI Terraform Provider that configures itself at runtime with the resources exposed by the service provider (defined in a swagger file)
Apache License 2.0
275 stars 48 forks source link

Update doc generator - check for array property description on items level #256

Closed lillchan closed 4 years ago

lillchan commented 4 years ago

Is your feature request related to a problem?

A clear and concise description of what problem this feature request is trying to solve

As an OpenAPI Terraform User
I want the documentation generator to look for array descriptions on the items level if there isn't one on the root property level
So that I can put descriptions on the array items (eg in the case of Goa) and have them rendered in the docs

Acceptance criteria

Given the following Swagger resource definition with an array property where the description is on the items level and there is no description on the property root level:

"Resource": {
    "properties": {
        "owners": {
            "items": {
                "description": "Users who own the resource",
                "type": "string"
            },
            "type": "array"
        },
    },
}

When the OpenAPI Terraform provider documentation generator is called

Then the rendered documentation should use the description from the array items.

Checklist (for admin only)

Don't forget to go through the checklist to make sure the issue is created properly: