Skip to content

Instantly share code, notes, and snippets.

@char0n
Created November 6, 2023 07:18
Show Gist options
  • Save char0n/cce5eecaefcf279efd0816730c5cf0d9 to your computer and use it in GitHub Desktop.
Save char0n/cce5eecaefcf279efd0816730c5cf0d9 to your computer and use it in GitHub Desktop.
{
"openapi": "3.1.0",
"info": {
"title": "FastAPI",
"version": "0.1.0"
},
"paths": {
"/hello": {
"get": {
"summary": "Hello",
"operationId": "hello_hello_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Message"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Message": {
"properties": {
"message": {
"type": "string",
"title": "Message"
},
"details": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/Message"
},
"type": "array"
}
],
"title": "Details"
}
},
"type": "object",
"required": [
"message"
],
"title": "Message"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment