Last active
January 27, 2024 22:33
-
-
Save Miron-Anosov/592859c930efbd15624d24eed42a1088 to your computer and use it in GitHub Desktop.
JSON format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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