Support of "oneOf, anyOf, allOf"
See original GitHub issueI’d like to have ability to configure my model to having something like this output:
"fieldName": {
"type": "array",
"items": {
"oneOf": [
{ "$ref": "#/definitions/item" },
{ "$ref": "#/definitions/itemGroup" }
]
}
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:8 (3 by maintainers)
Top Results From Across the Web
oneOf, anyOf, allOf, not
Use the anyOf keyword to validate the data against any amount of the given subschemas. That is, the data may be valid against...
Read more >AllOf, AnyOf, OneOf
The AllOf, AnyOf, OneOf nodes are all optional, and a schema can contain any combination of them. Example - Multiple Versions of a...
Read more >Why You Need oneOf in Your OpenAPI Specifications
“oneOf is simply a keyword defined by OpenAPI 3.0 which can be used to combine schemas.” To give more context, schemas are patterns...
Read more >Understanding JSON Schema 2020-12 documentation
allOf : (AND) Must be valid against all of the subschemas; anyOf: (OR) Must be valid against any of the subschemas; oneOf: (XOR)...
Read more >What is the difference between "anyof" and "oneof" in z ...
anyOf means the item must validate against at least one (but possibly more than one) of the schemas. oneOf means it must validate...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any update on this?
Our team is being held back by this and would really love to have the feature.
Is this supported in the 2.0 preview version?