Created
          December 16, 2012 17:42 
        
      - 
      
- 
        Save kevinswiber/4310097 to your computer and use it in GitHub Desktop. 
    Using Siren to demonstrate a PUT with different read/write models.
  
        
  
    
      This file contains hidden or 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
    
  
  
    
  | { | |
| "properties": { | |
| "title": "Error on page load", | |
| "description": "Steps to reproduce: ...", | |
| "severity": 1, | |
| "views": 6, | |
| "version": 3 | |
| }, | |
| "entities": [ | |
| { | |
| "rel": "http://rels.x.io/comments", | |
| "href": "http://x.io/bugs/1/comments" | |
| } | |
| ], | |
| "actions": [ | |
| { | |
| "name": "bug-update", | |
| "method": "PUT", | |
| "href": "http://x.io/bugs/1", | |
| "type": "application/x-www-form-urlencoded", | |
| "fields": [ | |
| { "name": "title", "type": "text" }, | |
| { "name": "description", "type": "text" }, | |
| { "name": "severity", "type": "number" }, | |
| { "name": "version", "type": "hidden", "value": "3" } | |
| ] | |
| } | |
| ], | |
| "links": [ | |
| { "rel": "self", "href": "http://x.io/bugs/1" }, | |
| { "rel": "next", "href": "http://x.io/bugs/2" } | |
| ] | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Siren spec, for reference: https://github.com/kevinswiber/siren