Created
January 8, 2013 15:31
-
-
Save anonymous/4484675 to your computer and use it in GitHub Desktop.
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
{ | |
"id": 123, | |
"title": "Example data", | |
"actions": { | |
"confirmAddress": "/item/123/confirmAddress", | |
"edit": "/item/123" | |
"addComment": "/item/123/comments" | |
} | |
} |
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
{ | |
"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