hashicorp / hashicorp/terraform-plugin-codegen-openapi
Support readOnly and writeOnly
- Dominant language
- Go
- Stars
- 91
- Forks
- 20
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 1
Description
### Use Cases or Problem Statement
Swagger OpenAPI v3 supports `readOnly` and `writeOnly` indicators https://swagger.io/docs/specification/v3_0/data-models/data-types/#objects.
However it seems the codegen does not yet support these.
### Proposal
Handle the `readOnly` and `writeOnly` attributes in the following way:
- `readOnly` -> "computed"
- `readOnly` & `default` -> "computed"
- `readOnly` & `required` -> "computed"
- `writeOnly` -> "optional"
- `writeOnly` & `default` -> "optional"
- `writeOnly` & `required` -> "required"
### Additional Information
https://swagger.io/docs/specification/v3_0/data-models/data-types/#objects

### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.