1
0
mirror of synced 2025-12-20 18:36:31 -05:00

Update OpenAPI Descriptions (#18553)

Co-authored-by: Rachael Sewell <rachmari@github.com>
This commit is contained in:
github-openapi-bot
2021-04-02 18:45:24 -04:00
committed by GitHub
parent 804269110f
commit 10fef4dfad
17 changed files with 2439 additions and 827 deletions

View File

@@ -105,6 +105,7 @@ function getExampleBodyParams ({ operation }) {
let schema
try {
schema = operation.requestBody.content['application/json'].schema
if (!schema.properties) return {}
} catch (noRequestBody) {
return {}
}
@@ -115,6 +116,8 @@ function getExampleBodyParams ({ operation }) {
if (schema.oneOf && schema.oneOf[0].type) {
schema = schema.oneOf[0]
} else if (schema.anyOf && schema.anyOf[0].type) {
schema = schema.anyOf[0]
}
const props =