how to make "optional" variant of a schema. #283
drortirosh
started this conversation in
General
Replies: 1 comment
-
Since JSON Schema is a constraint system, you start by defining the schema that is all-optional. Then you can In JSON Schema, you have to start with the most permissive version of a schema as the basis of re-use. The more restrictive versions build on that. This is because you cannot lift a constraint once it is applied. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have an object with 5 fields.
But in some APIs (e.g. in a search API) I want declare the same ObjetType, but with some of the field optional.
How do I declare these two types?
Beta Was this translation helpful? Give feedback.
All reactions