Closed
Description
I discovered that links object currently is not a member of relationships object.
Here is an example of resource object that I got:
{
"data": [{
"id":"980191848",
"type":"projects",
"attributes": {
"name":"optio",
"created_at":"2016-01-10T17:21:54.266Z",
"updated_at":"2016-01-10T17:21:54.266Z"
}, "relationships": {
"tasks": {
"data": [{
"id": "980191660", "type": "tasks"
}]
}
}, "links": {
"self":"//foo",
"related":"//bar"
}
}
]}
}
In other words link object is a neighbour of the relationships one. However, according to JSON API specification, relationships should had included links inside the tasks container:
"relationships": {
"tasks": {
"links": {
"self":"//foo",
"related":"//bar"
}, "data": [{
"id": "980191660", "type": "tasks"
}]
}
}
And it doesn't depend on how the links method is defined:
link :self, '//foo'
# or
def link
api_path(object)
end
How does the link object could be placed in a proper container?
Metadata
Metadata
Assignees
Labels
No labels