Hello,
I want to create users
resource ( POST /users
) and assign currency relationship. Which one is correct according the specification. I was thinking about first one since it makes sense to isolate relationship from attributes, but still I’m not sure.
{
"data": {
"type": "users",
"attributes": {
"username": "username"
},
"relationships": {
"currency": {
"data": { "type": "currencies", "id": "1" }
}
}
}
}
or
{
"data": {
"type": "users",
"attributes": {
"username": "username",
"currency_id": "1"
}
}
}
Thanks