When requesting to include records for relationships of the requested record (i.e. my-model?include=something1,something2, the relationships of those records are not included in the response.
I think this throws off at least ember-data a bit as it won't recognise any relationships for those records.
EDIT: some more information for this added below.
Example request:
GET /my-model/1?include=something
Example response from Lux (with the missing relationships for the records in "included"):
{
"data": {
"id": "1",
"type": "my-model",
"attributes": {
...
},
"relationships": {
"something": {
"data": {
"id": "30",
"type": "something"
},
"links": {
"self": "http://localhost:5000/something/30"
}
}
}
},
"included": [
{
"id": "30",
"type": "something",
"attributes": {
...
},
"links": {
"self": "http://localhost:5000/something/30"
}
}
],
"links": {
"self": "http://localhost:5000/my-model/1?include=something"
},
"jsonapi": {
"version": "1.0"
}
}
When requesting to include records for relationships of the requested record (i.e.
my-model?include=something1,something2, the relationships of those records are not included in the response.I think this throws off at least ember-data a bit as it won't recognise any relationships for those records.
EDIT: some more information for this added below.
Example request:
GET /my-model/1?include=somethingExample response from Lux (with the missing relationships for the records in "included"):
{ "data": { "id": "1", "type": "my-model", "attributes": { ... }, "relationships": { "something": { "data": { "id": "30", "type": "something" }, "links": { "self": "http://localhost:5000/something/30" } } } }, "included": [ { "id": "30", "type": "something", "attributes": { ... }, "links": { "self": "http://localhost:5000/something/30" } } ], "links": { "self": "http://localhost:5000/my-model/1?include=something" }, "jsonapi": { "version": "1.0" } }