Problem/Motivation
GET /api/node/article/900b681b-581a-4624-9ff6-99cc865df429/relationships/field_tags?_format=api_json&include=vid HTTP/1.1
Host: d8dev.local
Cache-Control: no-cache
Generates:
{
"data": [
{
"type": "taxonomy_term--tags",
"id": "3a04bb9e-8277-4615-8590-dd8c2ef8ad19"
},
{
"type": "taxonomy_term--tags",
"id": "e6520c95-45f0-45b7-8b69-d55a03fca109"
}
],
"links": {
"self": "http://d8dev.local/api/node/article/900b681b-581a-4624-9ff6-99cc865df429/relationships/field_tags?_format=api_json",
"related": "http://d8dev.local/api/node/article/900b681b-581a-4624-9ff6-99cc865df429/field_tags?_format=api_json"
}
}
Without the includes. That is an error according to the spec: http://jsonapi.org/format/#fetching-includes
Proposed resolution
Fix it.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 2801885--includes-relationships--3.patch | 3.5 KB | e0ipso |
Comments
Comment #2
e0ipsoComment #3
e0ipsoComment #5
e0ipsoMerged.
Comment #7
wim leersThe IS says that this:
is what JSON API returned before this fix went in. Well, today, in HEAD, that's also what JSON API returns when requesting
http://d8dev.local/jsonapi/node/article/c32bef09-21f5-4b63-a51f-29d0734edc3c/relationships/field_tags?include=vid. Novidto be seen.So it looks like HEAD regressed wrt this issue, which is understandable, given that there's no test coverage for this.