When I try to merge some openapi files, where no example is present, an example: null is added, this causes issue because, e.g. swagger editor does not show the fallback representation (if the example for an array response body is missing it should show an array with the representation of the item, but it shows "null").
version used: 1.0.5
e.g.
Using resolve, the POST /assets endpoint is represented this way:
/v3/assets/request:
post:
description: Request all assets according to a particular query
operationId: requestAssets_1
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/QuerySpec'
responses:
"200":
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/AssetOutput'
description: The assets matching the query
"400":
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ApiErrorDetail'
description: Request body was malformed
tags:
- Asset
after the merge, the same definition becomes:
/v3/assets/request:
post:
tags:
- Asset
description: Request all assets according to a particular query
operationId: requestAssets_1
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/QuerySpec'
responses:
"200":
description: The assets matching the query
content:
application/json:
schema:
type: array
example: null
items:
$ref: '#/components/schemas/AssetOutput'
"400":
description: Request body was malformed
content:
application/json:
schema:
type: array
example: null
items:
$ref: '#/components/schemas/ApiErrorDetail'
When I try to merge some openapi files, where no example is present, an
example: null
is added, this causes issue because, e.g. swagger editor does not show the fallback representation (if the example for an array response body is missing it should show an array with the representation of the item, but it shows "null").version used: 1.0.5
e.g. Using
resolve
, thePOST /assets
endpoint is represented this way:after the merge, the same definition becomes: