Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for readOnly and writeOnly fields #397

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

elsmr
Copy link
Contributor

@elsmr elsmr commented May 19, 2021

Handle readOnly and writeOnly fields in JSONSchema.

  • Exclude readOnly fields from Input types.
  • Exclude writeOnly fields from normal non-Input types.

https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.9.4

Other tools such as Redoc do something similar:

  • filter out readOnly fields in request bodies
  • filter out writeOnly fields in responses

@elsmr elsmr changed the title Exclude readOnly properties in Input types Add support for readOnly and writeOnly fields May 21, 2021
@elsmr elsmr force-pushed the readonly-props-input branch 3 times, most recently from 8fc1ccf to ea797e2 Compare May 21, 2021 13:03
elsmr added 5 commits May 21, 2021 16:55
Signed-off-by: Elias Meire <elias@meire.dev>
Signed-off-by: Elias Meire <elias@meire.dev>
Signed-off-by: Elias Meire <elias@meire.dev>
Signed-off-by: Elias Meire <elias@meire.dev>
Signed-off-by: Elias Meire <elias@meire.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant