{ "openapi": "3.0.0", "host": "localhost:3000", "basePath": "/api/v1/", "schemes": [ "http" ], "info": { "title": "API", "description": "API documentation for the API", "version": "1.0.0", "contact": { "name": "Lucas", "url": "https://github.com/lucasf5", "email": "lucasfpnt@gmail.com" } }, "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } } }, "paths": { "/register": { "post": { "tags": ["Autenticação"], "description": "Register", "summary": "Symmary: Register", "requestBody":{ "content": { "application/json": { "schema": { "type": "object", "properties": { "nome_usuario": { "type": "string" }, "email": { "type": "string" }, "senha": { "type": "string" }, "usuario_tipo": { "type": "string" }, "cpf_cnpj": { "type": "string" } } } } } }, "responses":{ "201": { "description": "Created" }, "400": { "description": "Could not register this user" } } } }, "/login": { "post": { "tags":["Autenticação"], "summary": "Summary: Login", "description": "Login", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string" }, "senha": { "type": "string" } } } } } }, "responses": { "200": { "description": "Login successfully" }, "400": { "description": "Authentication failed" } } } }, "/users": { "get": { "tags": [ "Usuários" ], "summary": "Summary: List all users", "description": "List all users", "operationId": "listUsers", "produces": [ "application/json" ], "responses": { "200": { "description": "A list of users" }, "500": { "description": "Internal server error" } } } }, "/users/{id}": { "get": { "tags": [ "Usuários" ], "summary": "Summary: Get a user by id", "description": "Get a user by id", "operationId": "getUserById", "produces": [ "application/json" ], "parameters": [ { "name": "id", "in": "path", "description": "User id", "required": true, "type": "integer" } ], "responses": { "200": { "description": "A user" }, "404": { "description": "User not found" }, "500": { "description": "Internal server error" } } } } } }