{"asyncapi":"2.6.0","id":"urn:ord-playground:events:inventory","info":{"title":"Inventory Events","version":"1.0.0","description":"Stock level changes. `productId` joins to the Products GraphQL API.\n\nEvents are [CloudEvents 1.0](https://cloudevents.io) in structured JSON mode."},"servers":{"local":{"url":"events-ord.zazukoians.org","protocol":"wss","description":"Event stream of the playground"}},"defaultContentType":"application/cloudevents+json","channels":{"/ws/inventory":{"description":"Stock level changes. `productId` joins to the Products GraphQL API.","subscribe":{"operationId":"onInventoryEvent","message":{"$ref":"#/components/messages/ProductStockChanged"}},"bindings":{"ws":{"bindingVersion":"0.1.0"}}}},"components":{"messages":{"ProductStockChanged":{"name":"ProductStockChanged","title":"Product Stock Changed","summary":"The stock level of a product changed","contentType":"application/cloudevents+json","payload":{"allOf":[{"$ref":"#/components/schemas/CloudEvent"},{"type":"object","properties":{"type":{"type":"string","const":"zazuko.shop.Product.StockChanged.v1"},"data":{"type":"object","required":["productId","delta","reason"],"properties":{"productId":{"type":"string","example":"P003"},"delta":{"type":"integer","example":-2},"reason":{"type":"string","enum":["sale","restock","return"]}}}}}]}}},"schemas":{"OrderStatus":{"type":"string","enum":["OPEN","PROCESSING","SHIPPED","DELIVERED","CANCELLED"]},"CloudEvent":{"type":"object","required":["specversion","id","source","type","time","data"],"properties":{"specversion":{"type":"string","const":"1.0"},"id":{"type":"string","format":"uuid"},"source":{"type":"string","example":"/ord-playground/order-events"},"type":{"type":"string"},"subject":{"type":"string","description":"ID of the business object the event is about"},"time":{"type":"string","format":"date-time"},"datacontenttype":{"type":"string","const":"application/json"},"data":{"type":"object"}}}}}}