Skip to content

Instantly share code, notes, and snippets.

@mamund
Last active January 14, 2021 21:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mamund/9443276 to your computer and use it in GitHub Desktop.
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/
<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>
@mamund
Copy link
Author

mamund commented Mar 11, 2014

@kinlane:

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