{ "openapi": "3.0.0", "info": { "title": "API de gerenciamento de uma biblioteca", "description": "Essa API tem como objetivo manipular um sistema de gerenciamento de uma biblioteca.", "termsOfService": "http://localhost:3000/terms", "contact": { "email": "martinianogomes@unifesspa.edu.br" }, "version": "1.0.0" }, "servers": [ { "url": "http://localhost:3000/", "description": "URL principal da API" } ], "paths": { "/books/create": { "post": { "summary": "Cadastro de livro", "description": "Essa rota será responsável por cadastrar um novo livro.", "tags": ["Books"], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Book" }, "examples": { "book": { "value": { "title": "Alice no país das maravílhas", "author": "Lewis Carroll", "genre": "Literatura fantástica, Literatura nonsense", "price": 50, "quantityInStorage": 50 } } } } } } }, "response": { } } }, "components": { "schemas": { "Book": { "type": "object", "properties": { "title": { "type": "string" }, "author": { "type": "string" }, "genre": { "type": "string" }, "price": { "type": "number" }, "quantityInStorage": { "type": "number" } } } } } }