Skip to content

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.

1 participant