{"swagger":"2.0","info":{"title":"paint-batch-optimizer","description":"service for paint factory owners to minimize the cost of paint production","contact":{"name":"Conor Fennell","email":"fennell.conor@gmail.com"},"version":"1.1.0"},"consumes":["application/json"],"produces":["application/json"],"paths":{"/_internal_/healthcheck":{"get":{"description":"GET health of service","parameters":[],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/healthcheck"}}}}},"/v2/optimize":{"post":{"description":"POST minimum cost paint batch optimizer request","parameters":[{"name":"optimizeRequest","in":"body","schema":{"$ref":"#/definitions/optimizeRequest"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/string"}},"422":{"description":"422 response","schema":{"$ref":"#/definitions/readableError"}}}}}},"definitions":{"demand":{"type":"object","description":"range of customers preferences to choose from","title":"demand","required":["paints"],"properties":{"paints":{"type":"array","items":{"$ref":"#/definitions/paint"}}}},"healthcheck":{"type":"object","description":"health of the service","title":"healthcheck","required":["status"],"properties":{"status":{"type":"string","enum":["ok"]}}},"optimizeRequest":{"type":"object","description":"paint batch optimizer request","title":"optimizeRequest","required":["colors","customers","demands"],"properties":{"colors":{"description":"number of different colours demanded by paint factory","maximum":2000,"minimum":1,"type":"integer","format":"int32"},"customers":{"description":"number of customers","maximum":2000,"minimum":1,"type":"integer","format":"int32"},"demands":{"type":"array","items":{"$ref":"#/definitions/demand"}}}},"paint":{"type":"object","description":"paint and its sheen","title":"paint","required":["id","sheen"],"properties":{"id":{"description":"paint identifier","maximum":2000,"minimum":1,"type":"integer","format":"int32"},"sheen":{"type":"string","enum":["Matte","Gloss"]}}},"readableError":{"type":"object","description":"A simple human-readable error","title":"readableError","required":["text"],"properties":{"text":{"type":"string"}}}}}