- 🇺🇸United States bradjones1 Digital Nomad Life
@abelass if you would like to help, you could re-roll/rebase this to 11.x and get the tests passing.
- last update
about 1 year ago 30,365 pass, 6 fail
Per the JSON API documentation:
https://jsonapi.org/format/#crud-updating
A resource can be updated by sending a PATCH request to the URL that represents the resource.
The URL for a resource can be obtained in the self link of the resource object.
This implies to me that when I receive an object in a response (direct fetch or query) I should be able to use the contents of the self
link of that object to find the reference to itself used to fetch (GET
), update (PATCH
) or delete (DELETE
) it. I should not need to manually build such a URL or modify the one I was given.
However for revisioned objects (e.g. nodes) the self link contains a query argument, resourceVersion
, which is not allowed on PATCH
requests.
An example self link currently might look like:
self: {
href: "http://localhost:8888/jsonapi/node/event/2e92d00c-13a3-4cb9-8f42-a3de32c6319b?resourceVersion=id%3A4066"
}
If I fetch a node via the API, make a change to some data in it and attempt to send it back to the server using the value of self.href
the PATCH
request will fail with a 400 (Bad Request)
with a detail in the errors array reading PATCH requests with a `resourceVersion` query parameter are not supported.
This behavior seems contrary to the specification and intent of providing a self URL.
Needs work
11.0 🔥
Last updated
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
@abelass if you would like to help, you could re-roll/rebase this to 11.x and get the tests passing.