Skip to content
This repository was archived by the owner on Jun 2, 2026. It is now read-only.

Add support for readOnly and writeOnly fields#397

Open
elsmr wants to merge 5 commits into
IBM:masterfrom
apideck-io:readonly-props-input
Open

Add support for readOnly and writeOnly fields#397
elsmr wants to merge 5 commits into
IBM:masterfrom
apideck-io:readonly-props-input

Conversation

@elsmr

@elsmr elsmr commented May 19, 2021

Copy link
Copy Markdown
Contributor

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant