blob: e58cb6dbb538626e1be15a6d59611c093efd98e7 [file] [log] [blame]
{
"openapi": "3.0.0",
"info": {
"title": "OpenAPI title.",
"version": "v1alpha1"
},
"paths": {},
"components": {
"schemas": {
"Embed": {
"type": "object",
"properties": {
"a": {
"type": "integer"
}
},
"allOf": [
{
"oneOf": [
{
"not": {
"anyOf": [
{
"required": [
"b"
],
"properties": {
"b": {
"$ref": "#/components/schemas/Embed.T"
}
}
},
{
"required": [
"c"
],
"properties": {
"c": {
"type": "integer"
}
}
}
]
}
},
{
"required": [
"b"
],
"properties": {
"b": {
"$ref": "#/components/schemas/Embed.T"
}
}
},
{
"required": [
"c"
],
"properties": {
"c": {
"type": "integer"
}
}
}
]
},
{
"oneOf": [
{
"not": {
"anyOf": [
{
"required": [
"d"
],
"properties": {
"d": {
"$ref": "#/components/schemas/Embed.T"
}
}
},
{
"required": [
"e"
],
"properties": {
"e": {
"type": "integer"
}
}
}
]
}
},
{
"required": [
"d"
],
"properties": {
"d": {
"$ref": "#/components/schemas/Embed.T"
}
}
},
{
"required": [
"e"
],
"properties": {
"e": {
"type": "integer"
}
}
}
]
}
]
},
"Embed.T": {
"type": "object",
"properties": {
"b": {
"type": "integer"
}
}
},
"Foo": {
"type": "object",
"required": [
"include",
"exclude",
"count"
],
"properties": {
"include": {
"$ref": "#/components/schemas/T"
},
"exclude": {
"type": "array",
"items": {
"$ref": "#/components/schemas/T"
}
},
"count": {
"$ref": "#/components/schemas/MyInt"
}
}
},
"Incompatible": {
"type": "object",
"oneOf": [
{
"allOf": [
{
"required": [
"shared"
],
"properties": {
"shared": {
"type": "integer"
}
}
},
{
"not": {
"anyOf": [
{
"required": [
"shared",
"extra1"
],
"properties": {
"shared": {
"type": "integer"
},
"extra1": {
"type": "integer"
}
}
},
{
"required": [
"shared",
"extra2"
],
"properties": {
"shared": {
"type": "integer"
},
"extra2": {
"type": "integer"
}
}
}
]
}
}
]
},
{
"required": [
"shared",
"extra1"
],
"properties": {
"shared": {
"type": "integer"
},
"extra1": {
"type": "integer"
}
}
},
{
"required": [
"shared",
"extra2"
],
"properties": {
"shared": {
"type": "integer"
},
"extra2": {
"type": "integer"
}
}
}
]
},
"MyInt": {
"type": "integer"
},
"T": {
"type": "object",
"properties": {
"shared": {
"type": "integer"
},
"shared2": {
"type": "integer"
}
},
"allOf": [
{
"required": [
"shared"
],
"oneOf": [
{
"not": {
"anyOf": [
{
"required": [
"exact"
],
"properties": {
"exact": {
"type": "string"
}
}
},
{
"required": [
"regex"
],
"properties": {
"regex": {
"type": "string"
}
}
}
]
}
},
{
"required": [
"exact"
],
"properties": {
"exact": {
"type": "string"
}
}
},
{
"required": [
"regex"
],
"properties": {
"regex": {
"type": "string"
}
}
}
]
},
{
"oneOf": [
{
"not": {
"anyOf": [
{
"required": [
"count"
],
"properties": {
"count": {
"type": "integer"
}
}
},
{
"required": [
"amount"
],
"properties": {
"amount": {
"type": "integer"
}
}
}
]
}
},
{
"required": [
"count"
],
"properties": {
"count": {
"type": "integer"
}
}
},
{
"required": [
"amount"
],
"properties": {
"amount": {
"type": "integer"
}
}
}
],
"required": [
"shared2"
]
}
]
},
"WithMap": {
"type": "object",
"oneOf": [
{
"allOf": [
{
"required": [
"shared"
],
"properties": {
"shared": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
}
}
},
{
"not": {
"anyOf": [
{
"required": [
"shared",
"extra"
],
"properties": {
"shared": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"extra": {
"type": "integer"
}
}
}
]
}
}
]
},
{
"allOf": [
{
"required": [
"shared",
"extra"
],
"properties": {
"shared": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"extra": {
"type": "integer"
}
}
},
{
"not": {
"anyOf": [
{
"required": [
"shared"
],
"properties": {
"shared": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
}
}
}
]
}
}
]
},
{
"required": [
"shared",
"extra"
],
"properties": {
"shared": {
"type": "string"
},
"extra": {
"type": "integer"
}
}
}
]
}
}
}
}