Last active
November 30, 2017 22:48
-
-
Save Startouf/7d6aaa2a616d4f1355afddc618c09ae1 to your computer and use it in GitHub Desktop.
Sideposting with json:api, with `method` allowing to desambiguate operations
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
{ | |
"data": { | |
"type": "profile", | |
"relationships": { | |
"educations": { | |
"data": [ | |
{ | |
"type": "profile/education", | |
"temp-id": 0, | |
"method": "create" | |
} | |
] | |
} | |
} | |
}, | |
"included": [ | |
{ | |
"type": "profile/education", | |
"temp-id": 0, | |
"attributes": { | |
"title": "Cool stuff at MIT !", | |
}, | |
"relationships": { | |
"school": { | |
"data": { | |
"type": "school", | |
"id": "5975f3caaba9cf3538d1b5a2", | |
"method": "associate" | |
} | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment