Skip to content

Instantly share code, notes, and snippets.

Created January 8, 2013 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/4484675 to your computer and use it in GitHub Desktop.
Save anonymous/4484675 to your computer and use it in GitHub Desktop.
{
"id": 123,
"title": "Example data",
"actions": {
"confirmAddress": "/item/123/confirmAddress",
"edit": "/item/123"
"addComment": "/item/123/comments"
}
}
{
"title": "Example schema",
"type": "object",
"properties": {
"actions": {
"title": "Actions",
"description": "This schema defines a bunch of links. However, the ones without appropriate URLs will be ignored.",
"links": [
{
"rel": "confirm",
"href": "{+confirmAddress}",
"method": "POST",
"schema": {...}
},
{
"rel": "edit",
"href": "{+edit}",
"method": "PUT",
"schema": {...}
},
{
"rel": "create",
"href": "{+addComment}",
"method": "POST",
"schema": {...}
},
{
"rel": "history",
"href": "{+history}",
"method": "GET"
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment