We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Here's a helpful post on the capabilities in JSON schema.
Here are the cases to handle:
a: Data Type: "Boolean" Required: True b: Data Type: "Numeric" Required: "if a" c: Data Type: "Numeric" Required: True
gives
{ "type": "object", "properties": { "a": { "type": "boolean" }, "b": { "type": "number" }, "c": { "type": "number" } }, "required": ["a", "c"], "dependencies": { "a": ["b"] } }
a: Data Type: "Boolean" Required: True b: Data Type: "Numeric" Required: "if a=False" c: Data Type: "Numeric" Required: True
{ "type": "object", "properties": { "a": { "type": "boolean" }, "b": { "type": "number" }, "c": { "type": "number" } }, "required": ["a", "c"], "if": { "properties": { "a": { "const": false} } }, "then": { "required": ["b"] } }
a: Data Type: "Boolean" Required: True b: Data Type: "Numeric" Required: "if a!=False" c: Data Type: "Numeric" Required: True
{ "type": "object", "properties": { "a": { "type": "boolean" }, "b": { "type": "number" }, "c": { "type": "number" } }, "required": ["a", "c"], "if": { "properties": { "a": { "not": {"const": false} } } }, "then": { "required": ["b"] } }
We may be able to find ways to combine these too. But I think covering these cases for now should be fine.
The text was updated successfully, but these errors were encountered:
@tanaya-bigladder I started a branch called conditional-requirements for this change.
Sorry, something went wrong.
tanaya-mankad
No branches or pull requests
Here's a helpful post on the capabilities in JSON schema.
Here are the cases to handle:
Is defined
gives
Is equal
gives
Is not equal
gives
We may be able to find ways to combine these too. But I think covering these cases for now should be fine.
The text was updated successfully, but these errors were encountered: