add support for oneOf anyOf allOf

This commit is contained in:
Greg Myers
2020-04-05 00:36:25 +01:00
parent d644a91da5
commit 965f14406f
4 changed files with 100 additions and 18 deletions

View File

@@ -155,6 +155,54 @@
}
}
},
"/blogs/flexible": {
"post": {
"summary": "Creates a blog flexible body",
"tags": [
"Blogs"
],
"description": "Creates a flexible blog from provided data",
"operationId": "createFlexibleBlog",
"parameters": [
],
"responses": {
"201": {
"description": "flexible blog created",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/blog"
},
{
"$ref": "#/components/schemas/flexible_blog"
}
]
}
}
}
}
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/blog"
},
{
"$ref": "#/components/schemas/flexible_blog"
}
]
}
}
}
}
}
},
"/blogs/{id}": {
"parameters": [
{