? ? Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
31 May 2021

Pull Request for Issue #34269 .

Summary of Changes

return the record in case of success
return a 404 in case of not found

Testing Instructions

  • PATCH an existing article
  • PATCH an unexisting article

Documentation Changes Required

avatar alikon alikon - open - 31 May 2021
avatar alikon alikon - change - 31 May 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 31 May 2021
Category Libraries
avatar wilsonge
wilsonge - comment - 31 May 2021

In terms of what it does JSON API says the following:

200 OK
If a server accepts an update but also changes the resource(s) in ways other than those specified by the request (for example, updating the updated-at attribute or a computed sha), it MUST return a 200 OK response. The response document MUST include a representation of the updated resource(s) as if a GET request was made to the request URL.

A server MUST return a 200 OK status code if an update is successful, the client’s current fields remain up to date, and the server responds only with top-level meta data. In this case the server MUST NOT include a representation of the updated resource(s).

204 No Content
If an update is successful and the server doesn’t update any fields besides those provided, the server MUST return either a 200 OK status code and response document (as described above) or a 204 No Content status code with no response document.

So I think if we decide to take the convention that if the document doesn't change we do return the 200 with a body rather than try and do the 204 this should be fine and ready for testing.

avatar alikon
alikon - comment - 1 Jun 2021

closing this 1 better to have 1 pr only for the same file

avatar alikon alikon - change - 1 Jun 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-06-01 06:48:07
Closed_By alikon
Labels Added: ? ?
avatar alikon alikon - close - 1 Jun 2021

Add a Comment

Login with GitHub to post a comment