{ "swagger": "2.0", "info": { "version": "2024-06-16T18:53:09Z", "title": "ProductServiceApi" }, "host": "ab19o21i40.execute-api.eu-north-1.amazonaws.com", "basePath": "/dev", "schemes": ["https"], "paths": { "/products": { "get": { "summary": "Gets a full array of products", "description": "Returns full array of available products", "operationId": "getProductsList", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Products" } } }, "x-amazon-apigateway-integration": { "httpMethod": "POST", "uri": "arn:aws:apigateway:eu-north-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-north-1:211125330358:function:ProductServiceApiStack-products606FDFD3-cgcaCZPUdfGA/invocations", "passthroughBehavior": "when_no_match", "type": "aws_proxy" } } }, "/products/{id}": { "get": { "summary": "Gets a product by ID", "description": "Returns searched product from an array of products OR status code 404 if not found", "operationId": "getProductsById", "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Product" } }, "404": { "description": "A product with the specified ID was not found.", "schema": { "$ref": "#/definitions/Error" } } }, "x-amazon-apigateway-integration": { "httpMethod": "POST", "uri": "arn:aws:apigateway:eu-north-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-north-1:211125330358:function:ProductServiceApiStack-productsByIdF298820A-Rxb3zJjJydBY/invocations", "passthroughBehavior": "when_no_match", "type": "aws_proxy" } } } }, "definitions": { "Product": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^\\d+$" }, "title": { "type": "string" }, "description": { "type": "string" }, "price": { "type": "number", "minimum": 0 }, "count": { "type": "integer", "minimum": 0 } }, "required": ["title", "price", "count"] }, "Products": { "type": "array", "items": { "$ref": "#/definitions/Product" } }, "Error": { "type": "object", "properties": { "message": { "type": "string" } } } } }