Skip to content

Instantly share code, notes, and snippets.

@geraintluff
Forked from anonymous/data.json
Last active December 10, 2015 19:58
Show Gist options
  • Save geraintluff/4484679 to your computer and use it in GitHub Desktop.
Save geraintluff/4484679 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"
},
{
"rel": "payment",
"href": "{+confirmCheckout}",
"method": "POST"
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment