Skip to content

Support readOnly and writeOnly #234

Open
@kenny-statsig

Description

@kenny-statsig

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

Image

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions