Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Startouf/7d6aaa2a616d4f1355afddc618c09ae1 to your computer and use it in GitHub Desktop.
Save Startouf/7d6aaa2a616d4f1355afddc618c09ae1 to your computer and use it in GitHub Desktop.
Sideposting with json:api, with `method` allowing to desambiguate operations
{
"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