10000 Add test cases for schema using subschemas and oneOf, anyOf, not by marians · Pull Request #4058 · giantswarm/happa · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add test cases for schema using subschemas and oneOf, anyOf, not #4058

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

Merged
merged 3 commits into from
Feb 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions src/components/UI/JSONSchemaForm/test.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,81 @@
"title": "Boolean fields",
"type": "object"
},
"logic": {
"description": "Uses of 'anyOf', 'oneOf', and 'not'.",
"properties": {
"anyOf": {
"properties": {
"anyOfDeprecated": {
"anyOf": [
{
"deprecated": true,
"minLength": 3,
"type": "string"
},
{
"minimum": 3,
"type": "number"
}
],
"description": "Only the second declared subschema (number, minimum=3) should be visible.",
"title": "Property with subschemas using 'anyOf' and 'deprecated'"
},
"anyOfSimple": {
"anyOf": [
{
"minLength": 3,
"type": "string"
},
{
"minimum": 3,
"type": "number"
}
],
"description": "Only the first declared subschema (string, minLength=3) should be visible.",
"title": "Property with two subschemas using 'anyOf'"
}
},
"title": "Subschema choice using 'anyOf'",
"type": "object"
},
"not": {
"properties": {
"stringNot": {
"description": "Value must not be 'forbidden'.",
"not": {
"const": "forbidden"
},
"title": "String with constraints defined via 'not'",
"type": "string"
}
},
"title": "Constraints defined via 'not'",
"type": "object"
},
"oneOf": {
"properties": {
"stringPatternOrEmpty": {
"description": "Value must either match a pattern ^[a-z]$ or be empty.",
"oneOf": [
{
"pattern": "^[a-z]$"
},
{
"const": ""
}
],
"title": "String matching pattern or empty",
"type": "string"
}
},
"title": "Subschema choice using 'oneOf'",
"type": "object"
}
},
"title": "Logic and subschemas",
"type": "object"
},
"numericFields": {
"properties": {
"integer": {
Expand Down
0