blob: b4112f913c73549a745027f1a81681dd34b51c90 [file] [log] [blame]
{
"openapi": "3.0.0",
"info": {
"title": "test",
"version": "v1"
},
"paths": {},
"components": {
"schemas": {
"DefaultStruct": {
"type": "object",
"properties": {
"port": {},
"obj": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"default": {
"port": 1
},
"oneOf": [
{
"required": [
"port",
"obj"
]
},
{
"required": [
"port"
]
}
]
},
"Enum": {
"type": "string",
"enum": [
"foo",
"bar",
"baz"
]
},
"Int32": {
"type": "integer",
"format": "int32"
},
"List": {
"type": "array",
"items": {
"type": "number"
},
"default": [
1,
2,
3
]
},
"Msg2": {
"type": "object",
"properties": {
"b": {
"type": "number"
},
"a": {
"type": "string"
}
},
"oneOf": [
{
"required": [
"b"
]
},
{
"required": [
"a"
]
}
]
},
"MyMessage": {
"description": "MyMessage is my message.",
"type": "object",
"required": [
"foo",
"bar"
],
"properties": {
"port": {
"type": "object",
"required": [
"port",
"obj"
],
"properties": {
"port": {
"type": "integer"
},
"obj": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"foo": {
"type": "integer",
"minimum": 10,
"exclusiveMinimum": true,
"maximum": 1000,
"exclusiveMaximum": true
},
"a": {
"description": "Field a.",
"type": "integer",
"enum": [
1
]
},
"bar": {
"type": "array",
"items": {
"type": "string"
}
},
"b": {
"type": "string"
}
},
"oneOf": [
{
"required": [
"a"
]
},
{
"required": [
"b"
]
}
]
},
"Port": {
"type": "object",
"required": [
"port",
"obj"
],
"properties": {
"port": {
"type": "integer"
},
"obj": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"YourMessage": {
"type": "object",
"properties": {
"a": {
"type": "string"
},
"b": {}
},
"oneOf": [
{
"required": [
"a"
]
},
{
"required": [
"b"
]
},
{
"required": [
"b"
]
}
]
},
"YourMessage2": {
"type": "object",
"properties": {
"a": {
"type": "number"
},
"c": {
"type": "number"
},
"e": {
"type": "number"
},
"f": {
"type": "number"
},
"d": {
"type": "number"
},
"b": {
"type": "number"
}
},
"allOf": [
{
"oneOf": [
{
"required": [
"a"
]
},
{
"required": [
"b"
]
}
]
},
{
"oneOf": [
{
"required": [
"c"
]
},
{
"required": [
"d"
]
}
]
},
{
"oneOf": [
{
"required": [
"e"
]
},
{
"required": [
"f"
]
}
]
}
]
}
}
}
}