openapi: 3.0.0 info: title: API RamenGo description: API desenvolvida para teste da empresa Red Ventures. version: 1.0.0 servers: - url: http://localhost:8080/api tags: - name: broths - name: proteins - name: orders paths: /broths: parameters: - in: header name: x-api-key required: true schema: type: string example: x-api-key get: summary: List all available broths tags: - broths responses: 200: description: A list of broths content: application/json: schema: $ref: '#/components/schemas/Broth' 403: $ref: '#/components/responses/Forbidden' /proteins: parameters: - in: header name: x-api-key required: true schema: type: string example: x-api-key get: summary: List all available proteins tags: - proteins responses: 200: description: A list of proteins content: application/json: schema: $ref: '#/components/schemas/Protein' 403: $ref: '#/components/responses/Forbidden' /orders: parameters: - in: header name: x-api-key required: true schema: type: string example: x-api-key post: summary: Place an order description: Adicionar um novo pedido tags: - orders requestBody: description: Order details required: true content: application/json: schema: $ref: '#/components/schemas/OrderRequest' responses: 201: description: Order placed successfully content: application/json: schema: $ref: '#/components/schemas/OrderResponse' 400: description: Invalid request content: application/json: schema: type: object properties: error: type: string example: both brothId and proteinId are required 403: $ref: '#/components/responses/Forbidden' 500: description: Internal server error content: application/json: schema: type: object properties: error: type: string example: could not place order components: responses: Forbidden: description: Forbidden content: application/json: schema: type: object properties: error: type: string example: x-api-key header missing schemas: Broth: type: object properties: id: type: string example: "1" imageInactive: type: string example: https://tech.redventures.com.br/icons/salt/inactive.svg imageActive: type: string example: https://tech.redventures.com.br/icons/salt/active.svg name: type: string example: Salt description: type: string example: Simple like the seawater, nothing more price: type: number example: 10 Protein: type: object properties: id: type: string example: "1" imageInactive: type: string example: https://tech.redventures.com.br/icons/salt/inactive.svg imageActive: type: string example: https://tech.redventures.com.br/icons/salt/active.svg name: type: string example: Chasu description: type: string example: A sliced flavourful pork meat with a selection of season vegetables. price: type: number example: 10 OrderRequest: type: object properties: brothId: type: string example: "1" proteinId: type: string example: "1" OrderResponse: type: object properties: id: type: string example: 123456 description: type: string example: Salt and Chasu Ramen image: type: string example: https://tech.redventures.com.br/icons/ramen/ramenChasu.png ErrorResponse: type: object properties: error: type: string