Access a PATCH
or DELETE
endpoint.
A valid JSON:API document response.
PATCH
: []
DELETE
: 1
Labels |
Added:
?
|
Labels |
Added:
?
|
OK just tested this - for me I'm not getting any response back from delete (as expected).
Obviously as you say patch is incorrect
so for the PATCH
this will be enough in your opinion ? @wilsonge @pjdevries
after this line
adding $this->displayItem($recordId);
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-05-31 17:12:11 |
Closed_By | ⇒ | alikon | |
Labels |
Added:
?
Removed: ? |
OK just tested this - for me I'm not getting any response back from delete (as expected).
Don't want to nit pick, bu no response is not entirely as expected. That is to say, if we want to comply with the JSON:API completely. Take a look at JSON:API says about DELETE
responses. A 200 response should return 'only top-level meta data'.
Don't want to nit pick, bu no response is not entirely as expected. That is to say, if we want to comply with the JSON:API completely. Take a look at JSON:API says about DELETE responses. A 200 response should return 'only top-level meta data'.
I agree but I'm getting back a 204 not a 200 (which is expected as we're setting that here https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/MVC/Controller/ApiController.php#L322) and that's totally allowed by JSON API in that section.
Would be useful to see what request you're getting a 200 from on a delete. Because I can't seem to reproduce that.
Would be useful to see what request you're getting a 200 from on a delete. Because I can't seem to reproduce that.
I'm getting a 200 from my recently added media web service :) Deleting an article gives me a 204 but also returns an unexpected literal 1
in the response.
Agree patch needs fixing.
To me delete should be returning the empty response as https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/MVC/Controller/ApiController.php#L322 doesn’t output anything. Should be an easy fix somewhere