Skip to content

Instantly share code, notes, and snippets.

@Miron-Anosov
Last active January 27, 2024 22:33
Show Gist options
  • Save Miron-Anosov/592859c930efbd15624d24eed42a1088 to your computer and use it in GitHub Desktop.
Save Miron-Anosov/592859c930efbd15624d24eed42a1088 to your computer and use it in GitHub Desktop.
JSON format
{
"summary": "This is an endpoint for obtaining the books list.",
"tags": ["Authors"],
"parameters": [
{
"in": "body",
"name": "authorData",
"description": "Data of the author",
"required": true,
"schema": {
"type": "object",
"properties": {
"first_name": {"type": "string", "required": true
},
"last_name": {"type": "string", "required": true
},
"middle_name": {"type": "string", "required": true,
"description": "middle_name may be an empty string"
}
}
}
}
],
"responses": {
"201": {
"description": "Books data",
"schema": {
"type": "array", "items": {
"$ref": "#/definitions/Author"
}
}
}, "400": {
"description": "Validation Error."
}},
"description": "You can create an author in the database by providing their first name and last name."
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment