{ "components": { "schemas": { "demand": { "description": "range of customers preferences to choose from", "properties": { "paints": { "items": { "$ref": "#/components/schemas/paint" }, "type": "array", "description": "paints the customer would be satisfied with", "minItems": 1, "maxItems": 2000 } }, "required": [ "paints" ], "type": "object" }, "healthcheck": { "description": "health of the service", "properties": { "status": { "$ref": "#/components/schemas/status", "description": "the health status of the service" } }, "required": [ "status" ], "type": "object" }, "optimizeRequest": { "description": "paint batch optimizer request", "properties": { "colors": { "type": "integer", "description": "number of different colours demanded by paint factory", "minimum": 1, "maximum": 2000 }, "customers": { "type": "integer", "description": "number of customers", "minimum": 1, "maximum": 2000 }, "demands": { "items": { "$ref": "#/components/schemas/demand" }, "type": "array", "description": "customers paint demands" } }, "required": [ "colors", "customers", "demands" ], "type": "object" }, "paint": { "description": "paint and its sheen", "properties": { "id": { "type": "integer", "description": "paint identifier", "minimum": 1, "maximum": 2000 }, "sheen": { "$ref": "#/components/schemas/sheen", "description": "sheen of the paint" } }, "required": [ "id", "sheen" ], "type": "object" }, "readableError": { "description": "A simple human-readable error", "properties": { "text": { "type": "string" } }, "required": [ "text" ], "type": "object" }, "sheen": { "description": "available paint sheens. Possible values: Matte,Gloss.", "enum": [ "Matte", "Gloss" ], "type": "string" }, "status": { "description": "health of the service. Possible values: ok.", "enum": [ "ok" ], "type": "string" } } }, "info": { "contact": { "name": "Conor Fennell", "email": "fennell.conor@gmail.com" }, "description": "service for paint factory owners to minimize the cost of paint production", "license": {}, "termsOfService": "", "title": "paint-batch-optimizer", "version": "1.1.0" }, "openapi": "3.0.2", "paths": { "/_internal_/healthcheck": { "get": { "description": "GET health of service", "operationId": "get--_internal_-healthcheck", "parameters": [], "responses": { "200": { "description": "com.paintbatch.models.healthcheck", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/healthcheck" } } }, "headers": {} } }, "tags": [ "healthcheck" ] } }, "/v2/optimize": { "post": { "description": "POST minimum cost paint batch optimizer request", "operationId": "post--v-optimize", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/optimizeRequest" } } } }, "responses": { "200": { "description": "string", "content": { "application/json": { "schema": { "type": "string" } } }, "headers": {} }, "422": { "description": "com.paintbatch.models.readableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/readableError" } } }, "headers": {} } }, "tags": [ "optimizeRequest" ] } } }, "servers": [ {} ] }