openapi-python-client icon indicating copy to clipboard operation
openapi-python-client copied to clipboard

Support read- and write only fields

Open rafalkrupinski opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. non-nullable read- and write-only fields are required only in either request or response objects. In the generated client they are all required tho.

Describe the solution you'd like A simple solution would be to make all required read and write-only fields behave as nullable. Another one would be introduce a base model class with all other fields and writeable & readable subclasses with write and read-only fields respectively.

Additional context I'd be happy to prepare a PR for the first approach

rafalkrupinski avatar Apr 30 '22 19:04 rafalkrupinski