{"openapi":"3.1.0","info":{"title":"inkan.dev playground","version":"1.0.0","description":"The API behind the playground on inkan.dev. It runs in memory and resets with the server."},"paths":{"/api/teas":{"get":{"operationId":"getApiTeas","summary":"Every tea on the shelf","tags":["teas"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Tea"}}}}}},"x-inkan-examples":[{"name":"the shelf"}]},"post":{"operationId":"postApiTeas","summary":"Put a tea on the shelf","tags":["teas"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTea"},"examples":{"a bancha":{"value":{"name":"Bancha","grams":80}},"no name":{"value":{"name":"","grams":-5}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tea"}}}},"400":{"description":"The input does not match the contract","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-inkan-implied":true}},"x-inkan-examples":[{"name":"a bancha","body":{"name":"Bancha","grams":80}},{"name":"no name","body":{"name":"","grams":-5},"status":400}]}},"/api/teas/{id}":{"get":{"operationId":"getApiTeasById","summary":"One tea","tags":["teas"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"examples":{"a sencha":{"value":1},"no such tea":{"value":999}}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tea"}}}},"400":{"description":"The input does not match the contract","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"x-inkan-implied":true},"404":{"description":"An RFC 9457 problem document","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-inkan-examples":[{"name":"a sencha","params":{"id":1},"expect":{"name":"Sencha"}},{"name":"no such tea","params":{"id":999},"status":404}]}},"/api/teas/reset":{"post":{"operationId":"postApiTeasReset","summary":"Back to the three teas it started with","tags":["teas"],"responses":{"200":{"description":"OK"}}}},"/api/kettle":{"get":{"operationId":"getApiKettle","summary":"The kettle, as server-sent events: five readings, then done","tags":["streams"],"responses":{"200":{"description":"OK","content":{"text/event-stream":{"schema":{"oneOf":[{"type":"object","properties":{"event":{"const":"temp"},"data":{"type":"object","properties":{"celsius":{"type":"integer"}},"required":["celsius"]},"id":{"type":"string"}},"required":["event","data"]},{"type":"object","properties":{"event":{"const":"done"},"data":{"type":"object","properties":{"ready":{"type":"boolean"}},"required":["ready"]},"id":{"type":"string"}},"required":["event","data"]}]}}}}}}}},"components":{"schemas":{"Tea":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"grams":{"type":"integer"},"brewed":{"type":"string","format":"date-time"}},"required":["id","name","grams","brewed"]},"Problem":{"type":"object","properties":{"type":{"type":"string","description":"A stable code for this kind of problem"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status"],"description":"An RFC 9457 problem document"},"NewTea":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40},"grams":{"type":"integer","minimum":1,"maximum":1000}},"required":["name","grams"]}}}}