hashicorp / hashicorp/packer-plugin-sdk
Struct Documentation: Also squash down docs from sub structures
- Dominant language
- Go
- Stars
- 42
- Forks
- 62
- Avg merge
- 29m
- Merged PRs (30d)
- 2
Description
A lot of fields from embedded structs are "mapstructure squashed" down for Packer. This allows to reutilize features/fields from different structs. When generating docs from these, the documentation for those fields is not automatically squashed but created in another file, resulting in possible loss of information. One fix for this would be to import the sub structs at a later step, but this being quite manual, we tend to forget things.
I think that it could be a better idea to just generate docs of squashed fields directly inline.
A good example for that is the [SSHTemporaryKeyPair](https://github.com/hashicorp/packer-plugin-sdk/blob/27bd01ebe2e4980121d6fd140548a007dac8931c/communicator/config.go#L192-L211) struct that is used by the SSH comminactor/struct but not documented anywhere.
related: https://github.com/hashicorp/packer-plugin-linode/issues/18
related: https://github.com/hashicorp/packer/pull/10101
Contributor guide
Assessment
This issue has not been assessed yet.