Is your feature request related to a problem? Please describe.
OpenAPI allows you to set a readOnly
& writeOnly
for fields to be able to reuse schemas for get and post for instance. See docs for more information. Would be nice to also support this, makes things a lot more "dry" on the spec side of things.
Describe the solution you'd like
Since Pydantic does not support read/write only fields a possible solution could be to generate 2 versions of the same schema one with and one without the read/write only field.
Describe alternatives you've considered
Alternative would be to define 2 different schemas in the openapi spec instead
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too