Last active
January 14, 2021 21:58
-
-
Save mamund/9443276 to your computer and use it in GitHub Desktop.
Hello World Products API in ALPS just like the examples here: http://apievangelist.com/2014/03/08/hello-world-product-api-with-blueprint-raml-and-swagger/
This file contains 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
<alps version="1.0"> | |
<link rel="help" href="http://example.org/documentation/products.html" /> | |
<doc> | |
This is a prototype product API. | |
</doc> | |
<!-- transitions --> | |
<descriptor id="item" type="safe" rt="#product"> | |
<doc>Retrieve A Single Product</doc> | |
</descriptor> | |
<descriptor id="collection" type="safe" rt="#product"> | |
<doc>Provides access to all products</doc> | |
</descriptor> | |
<descriptor id="search" type="safe" rt="#product"> | |
<doc>Provides access to all products</doc> | |
<descriptor href="#id" /> | |
</descriptor> | |
<descriptor id="edit" type="idempotent" rt="#product"> | |
<doc>Updates A Product</doc> | |
<descriptor href="#product" /> | |
</descriptor> | |
<descriptor id="create" type="unsafe" rt="#product"> | |
<doc>Allows the creation of a new product</doc> | |
<descriptor href="#product" /> | |
</descriptor> | |
<descriptor id="delete" type="idempotent"> | |
<doc>Delete A Product </doc> | |
</descriptor> | |
<!-- product --> | |
<descriptor id="product" type="semantic"> | |
<descriptor id="id" /> | |
<descriptor id="name" /> | |
<descriptor id="description" /> | |
<descriptor id="url" /> | |
<descriptor id="thumbnailUrl" /> | |
<descriptor id="keywords" /> | |
<descriptor id="brand" /> | |
<descriptor id="color" /> | |
<descriptor id="itemCondition" /> | |
<descriptor id="manufacturer" /> | |
<descriptor id="model" /> | |
<descriptor id="sku" /> | |
<descriptor id="weight" /> | |
<descriptor id="width" /> | |
<descriptor id="height" /> | |
<descriptor id="depth" /> | |
</descriptor> | |
</alps> |
This is really intuitive. Interesting approach. I'm going to update that post, just to keep on mine, and everyone elses list to learn more about.
Very cool. thanks! feel free to ping me anytime and we can talk about this. Otherwise, I'll see you in Amsterdam!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is a JSON variant, too. Check it all out here: http://alps.io