{
"openapi": "3.0.3",
"info": {
"title": "An API",
"version": "1.0.0"
},
"paths": {
"/demo": {
"get": {
"operationId": "the_operation",
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MyReturn"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
}
},
"components": {
"schemas": {
"Error": {
"description": "Error information from a response.",
"type": "object",
"properties": {
"error_code": {
"type": "string"
},
"message": {
"type": "string"
},
"request_id": {
"type": "string"
}
},
"required": [
"message",
"request_id"
]
},
"MyReturn": {
"type": "object",
"properties": {
"q": {
"type": "string"
}
},
"required": [
"q"
]
}
},
"responses": {
"Error": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
}