hashicorp / hashicorp/terraform-plugin-docs

bug: TypeSet/TypeList Elements are not rendered in data-sources

Open
#64 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
263
Forks
84
Avg merge
3d 6h
Merged PRs (30d)
2

Description

## Current behavior
The descriptions of the nested elements are only rendered in the markdown of the ` resources`, but not the `datasources`.

- The schema:
```go
"ipam_config": {
Type: schema.TypeSet,
Description: "The IPAM configuration options",
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"subnet": {
Type: schema.TypeString,
Description: "The subnet in CIDR form",
Optional: true,
ForceNew: true,
},

"ip_range": {
Type: schema.TypeString,
Description: "The ip range in CIDR form",
Optional: true,
ForceNew: true,
},

"gateway": {
Type: schema.TypeString,
Description: "The IP address of the gateway",
Optional: true,
ForceNew: true,
},

"aux_address": {
Type: schema.TypeMap,
Description: "Auxiliary IPv4 or IPv6 addresses used by Network driver",
Optional: true,
ForceNew: true,
},
},
},
},
```

See the rendered markdowns:
- https://github.com/kreuzwerker/terraform-provider-docker/blob/feat/doc-generation/docs/resources/network.md#nested-schema-for-ipam_config
- https://github.com/kreuzwerker/terraform-provider-docker/blob/feat/doc-generation/docs/data-sources/network.md#nested-schema-for-ipam_config

## Expected behavior
The descriptions of the nested elements in `datasources` are also rendered in the markdown.

## Versions
- terraform-plugin-docs: `v0.4.0`
- terraform-plugin-sdk/v2 `v2.6.1`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.