Created
June 13, 2014 13:04
-
-
Save odrotbohm/0ebe87e8095a9166e9e7 to your computer and use it in GitHub Desktop.
Sample ALPS document for Spring RESTBucks orders
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version" : "1.0", | |
"descriptors" : [ { | |
"id" : "order-representation", | |
"descriptors" : [ { | |
"name" : "status", | |
"doc" : { | |
"value" : "PAYMENT_EXPECTED, PAID, PREPARING, READY, TAKEN", | |
"format" : "TEXT" | |
}, | |
"type" : "SEMANTIC" | |
}, { | |
"name" : "location", | |
"doc" : { | |
"value" : "TAKE_AWAY, IN_STORE", | |
"format" : "TEXT" | |
}, | |
"type" : "SEMANTIC" | |
}, { | |
"name" : "orderedDate", | |
"type" : "SEMANTIC" | |
}, { | |
"name" : "items", | |
"type" : "SEMANTIC", | |
"descriptors" : [ { | |
"name" : "name", | |
"type" : "SEMANTIC" | |
}, { | |
"name" : "milk", | |
"doc" : { | |
"value" : "WHOLE, SEMI", | |
"format" : "TEXT" | |
}, | |
"type" : "SEMANTIC" | |
}, { | |
"name" : "size", | |
"doc" : { | |
"value" : "SMALL, LARGE", | |
"format" : "TEXT" | |
}, | |
"type" : "SEMANTIC" | |
}, { | |
"name" : "quantity", | |
"type" : "SEMANTIC" | |
}, { | |
"name" : "price", | |
"type" : "SEMANTIC", | |
"descriptors" : [ { | |
"name" : "currency", | |
"type" : "SEMANTIC" | |
}, { | |
"name" : "value", | |
"type" : "SEMANTIC" | |
} ] | |
} ] | |
} ] | |
}, { | |
"id" : "create-orders", | |
"name" : "orders", | |
"type" : "UNSAFE", | |
"rt" : "#order-representation" | |
}, { | |
"id" : "get-orders", | |
"name" : "orders", | |
"type" : "SAFE", | |
"rt" : "#order-representation", | |
"descriptors" : [ { | |
"name" : "page", | |
"doc" : { | |
"value" : "The page to return.", | |
"format" : "TEXT" | |
}, | |
"type" : "SEMANTIC" | |
}, { | |
"name" : "size", | |
"doc" : { | |
"value" : "The size of the page to return.", | |
"format" : "TEXT" | |
}, | |
"type" : "SEMANTIC" | |
}, { | |
"name" : "sort", | |
"doc" : { | |
"value" : "The sorting criteria to use to calculate the content of the page.", | |
"format" : "TEXT" | |
}, | |
"type" : "SEMANTIC" | |
}, { | |
"name" : "projection", | |
"doc" : { | |
"value" : "The projection that shall be applied when rendering the response. Acceptable values available in nested descriptors.", | |
"format" : "TEXT" | |
}, | |
"type" : "SEMANTIC", | |
"descriptors" : [ { | |
"name" : "summary", | |
"type" : "SEMANTIC", | |
"descriptors" : [ { | |
"name" : "orderedDate", | |
"type" : "SEMANTIC" | |
}, { | |
"name" : "status", | |
"type" : "SEMANTIC" | |
} ] | |
} ] | |
} ] | |
}, { | |
"id" : "update-order", | |
"name" : "order", | |
"type" : "IDEMPOTENT", | |
"rt" : "#order-representation" | |
}, { | |
"id" : "get-order", | |
"name" : "order", | |
"type" : "SAFE", | |
"rt" : "#order-representation", | |
"descriptors" : [ { | |
"name" : "projection", | |
"doc" : { | |
"value" : "The projection that shall be applied when rendering the response. Acceptable values available in nested descriptors.", | |
"format" : "TEXT" | |
}, | |
"type" : "SEMANTIC", | |
"descriptors" : [ { | |
"name" : "summary", | |
"type" : "SEMANTIC", | |
"descriptors" : [ { | |
"name" : "orderedDate", | |
"type" : "SEMANTIC" | |
}, { | |
"name" : "status", | |
"type" : "SEMANTIC" | |
} ] | |
} ] | |
} ] | |
}, { | |
"id" : "patch-order", | |
"name" : "order", | |
"type" : "UNSAFE", | |
"rt" : "#order-representation" | |
}, { | |
"id" : "delete-order", | |
"name" : "order", | |
"type" : "IDEMPOTENT", | |
"rt" : "#order-representation" | |
}, { | |
"name" : "findByStatus", | |
"type" : "SAFE", | |
"descriptors" : [ { | |
"name" : "status", | |
"doc" : { | |
"value" : "PAYMENT_EXPECTED, PAID, PREPARING, READY, TAKEN", | |
"format" : "TEXT" | |
}, | |
"type" : "SEMANTIC" | |
} ] | |
} ] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment