JSON:API v1.1 is now in RC3 (and has been since 2 Oct 2020).
On https://jsonapi.org/format/1.1/ they state: "Version 1.1 is a release candidate. As such, the content on this page is unlikely to change. However, some changes may still occur if implementation experience proves that they are necessary before this version is finalized."
Just wondering if there has been any work done or plans to implement the changes in this version?
In particular, the addition of 'lid' instead of just 'id' Identification (https://jsonapi.org/format/1.1/#document-resource-identifier-objects) to locally identify Resource Identifier Objects (https://jsonapi.org/format/1.1/#document-resource-identifier-objects) within a document is very interesting. Correct me if I'm wrong but wouldn't this allow the creation of the main (parent) Resource Object along with any related Resource Object/s by use of 'lid's?
If i'm correct in my thinking, a POST containing the following Compound Document could save multiple POST requests for related entities.
E.G
{
"data": {
"type": "User",
"attributes": {
"name": "Test User 1"
},
"relationships": {
"group": {
"data": {
"type": "Group",
"id": "/groups/1"
}
},
"category": {
"data": {
"type": "Category",
"lid": "newCategory1"
}
},
"tags": {
"data": [
{
"type": "Tag",
"lid": "newTag1"
},
{
"type": "Tag",
"lid": "newTag2"
}
]
}
}
},
"included": [
{
"type": "Category",
"lid": "newCategory1",
"attributes": {
"lid": "newCategory1",
"name": "New Category 1"
},
"relationships": {
"sections": {
"data": [
{
"type": "Section",
"id": "/sections/1"
}
]
}
}
},
{
"type": "Tag",
"lid": "newTag1",
"attributes": {
"lid": "newTag1",
"name": "New Tag 1"
}
},
{
"type": "Tag",
"lid": "newTag2",
"attributes": {
"lid": "newTag2",
"name": "New Tag 2"
}
}
]
}
This ideally would:
- Create a new User entity
- Link the existing Group 1 entity to the new User entity
- Create a new Category entity (linking the existing Section 1 entity to the new Category entity) and link to the new User entity
- Create 2 new Tag entities and link to the new User entity
JSON:API v1.1 is now in RC3 (and has been since 2 Oct 2020).
On https://jsonapi.org/format/1.1/ they state: "Version 1.1 is a release candidate. As such, the content on this page is unlikely to change. However, some changes may still occur if implementation experience proves that they are necessary before this version is finalized."
Just wondering if there has been any work done or plans to implement the changes in this version?
In particular, the addition of 'lid' instead of just 'id' Identification (https://jsonapi.org/format/1.1/#document-resource-identifier-objects) to locally identify Resource Identifier Objects (https://jsonapi.org/format/1.1/#document-resource-identifier-objects) within a document is very interesting. Correct me if I'm wrong but wouldn't this allow the creation of the main (parent) Resource Object along with any related Resource Object/s by use of 'lid's?
If i'm correct in my thinking, a POST containing the following Compound Document could save multiple POST requests for related entities.
E.G
{ "data": { "type": "User", "attributes": { "name": "Test User 1" }, "relationships": { "group": { "data": { "type": "Group", "id": "/groups/1" } }, "category": { "data": { "type": "Category", "lid": "newCategory1" } }, "tags": { "data": [ { "type": "Tag", "lid": "newTag1" }, { "type": "Tag", "lid": "newTag2" } ] } } }, "included": [ { "type": "Category", "lid": "newCategory1", "attributes": { "lid": "newCategory1", "name": "New Category 1" }, "relationships": { "sections": { "data": [ { "type": "Section", "id": "/sections/1" } ] } } }, { "type": "Tag", "lid": "newTag1", "attributes": { "lid": "newTag1", "name": "New Tag 1" } }, { "type": "Tag", "lid": "newTag2", "attributes": { "lid": "newTag2", "name": "New Tag 2" } } ] }This ideally would: