{"openapi":"3.0.3","info":{"title":"Orders OData Service","version":"1.0.0","description":"OpenAPI view on the Orders OData V4 service. `CustomerID` joins to the Customers API, `ProductID` joins to the Products GraphQL API."},"servers":[{"url":"https://orders-ord.zazukoians.org/odata/v4/orders"}],"paths":{"/Orders":{"get":{"operationId":"listOrders","summary":"Query orders","parameters":[{"$ref":"#/components/parameters/filter"},{"$ref":"#/components/parameters/select"},{"$ref":"#/components/parameters/orderby"},{"$ref":"#/components/parameters/expand"},{"$ref":"#/components/parameters/top"},{"$ref":"#/components/parameters/skip"},{"$ref":"#/components/parameters/count"}],"responses":{"200":{"description":"Collection of Order","content":{"application/json":{"schema":{"type":"object","properties":{"@odata.count":{"type":"integer"},"value":{"type":"array","items":{"$ref":"#/components/schemas/Order"}}}}}}}}}},"/Orders('{OrderID}')":{"parameters":[{"name":"OrderID","in":"path","required":true,"schema":{"type":"string","example":"O1001"}}],"get":{"operationId":"getOrder","summary":"Get a single order","parameters":[{"$ref":"#/components/parameters/select"},{"$ref":"#/components/parameters/expand"}],"responses":{"200":{"description":"Order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"404":{"description":"Not found"}}}},"/Orders('{OrderID}')/Items":{"parameters":[{"name":"OrderID","in":"path","required":true,"schema":{"type":"string","example":"O1001"}}],"get":{"operationId":"listItemsOfOrder","summary":"Items of an order","parameters":[{"$ref":"#/components/parameters/filter"},{"$ref":"#/components/parameters/select"},{"$ref":"#/components/parameters/orderby"},{"$ref":"#/components/parameters/expand"},{"$ref":"#/components/parameters/top"},{"$ref":"#/components/parameters/skip"},{"$ref":"#/components/parameters/count"}],"responses":{"200":{"description":"Collection of OrderItem","content":{"application/json":{"schema":{"type":"object","properties":{"@odata.count":{"type":"integer"},"value":{"type":"array","items":{"$ref":"#/components/schemas/OrderItem"}}}}}}}}}},"/OrderItems":{"get":{"operationId":"listOrderItems","summary":"Query order items","parameters":[{"$ref":"#/components/parameters/filter"},{"$ref":"#/components/parameters/select"},{"$ref":"#/components/parameters/orderby"},{"$ref":"#/components/parameters/expand"},{"$ref":"#/components/parameters/top"},{"$ref":"#/components/parameters/skip"},{"$ref":"#/components/parameters/count"}],"responses":{"200":{"description":"Collection of OrderItem","content":{"application/json":{"schema":{"type":"object","properties":{"@odata.count":{"type":"integer"},"value":{"type":"array","items":{"$ref":"#/components/schemas/OrderItem"}}}}}}}}}}},"components":{"schemas":{"Order":{"type":"object","properties":{"OrderID":{"type":"string"},"CustomerID":{"type":"string","description":"References a customer of the Customers REST API (/api/v1/customers/{id})"},"OrderDate":{"type":"string","format":"date"},"Status":{"type":"string","description":"OPEN | PROCESSING | SHIPPED | DELIVERED | CANCELLED"},"Currency":{"type":"string"},"TotalAmount":{"type":"number","format":"decimal"},"ItemCount":{"type":"integer","format":"int32"},"Items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItem"}}}},"OrderItem":{"type":"object","properties":{"ItemID":{"type":"string"},"OrderID":{"type":"string"},"LineNo":{"type":"integer","format":"int32"},"ProductID":{"type":"string","description":"References a product of the Products GraphQL API (product(id:))"},"Quantity":{"type":"integer","format":"int32"},"UnitPrice":{"type":"number","format":"decimal"},"LineAmount":{"type":"number","format":"decimal"},"Order":{"$ref":"#/components/schemas/Order"}}}},"parameters":{"filter":{"name":"$filter","in":"query","description":"Filter expression, e.g. `CustomerID eq 'C001' and Status in ('OPEN','SHIPPED')`","schema":{"type":"string"}},"select":{"name":"$select","in":"query","description":"Comma-separated list of properties","schema":{"type":"string"}},"orderby":{"name":"$orderby","in":"query","description":"e.g. `TotalAmount desc`","schema":{"type":"string"}},"expand":{"name":"$expand","in":"query","description":"e.g. `Items` or `Items($select=ProductID,Quantity)`","schema":{"type":"string"}},"top":{"name":"$top","in":"query","description":"Page size","schema":{"type":"integer","minimum":0}},"skip":{"name":"$skip","in":"query","description":"Items to skip","schema":{"type":"integer","minimum":0}},"count":{"name":"$count","in":"query","description":"Include @odata.count","schema":{"type":"boolean"}}}}}