The response schema is marked as "Optional" but I don't think there is a way to mark it as required in the specification data (docs about describing responses in OA3).
openapi: 3.0.0
servers: []
info:
description: |
Example
version: 1.0.0
title: Swagger Petstore YAML
tags:
- name: pet
description: Everything about your Pets
paths:
/pet:
post:
tags:
- pet
summary: Add a new pet to the store
description: Add new pet to the store inventory.
operationId: addPet
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/Pet"
"405":
description: Invalid input
requestBody:
$ref: "#/components/requestBodies/Pet"
components:
schemas:
Pet:
type: object
required:
- age
properties:
age:
description: The age of the pet
type: number
example: 5
requestBodies:
Pet:
content:
application/json:
schema:
allOf:
- description: My Pet
title: Pettie
- $ref: "#/components/schemas/Pet"
description: Pet object that needs to be added to the store
required: true
The response schema is marked as "Optional" but I don't think there is a way to mark it as required in the specification data (docs about describing responses in OA3).![image](https://user-images.githubusercontent.com/21205591/233841770-07128156-c8cf-47f2-af8e-fb2159193606.png)
Version: 0.6.4 Commit: 0beb11b248e34e2b88f171406fc4fb04a390f065 Reproduction spec: