WordPress/wp-includes/rest-api/endpoints
Rachel Baker 5564716a07 REST API: Modify the structure of our DELETE responses to be more explicit.
Add the `deleted` property to the root of the Response object to communicate if the delete action was successful. Move the state of the resource prior to the delete request under a new `previous` property.  As a result DELETE responses are now structured like so:
 `{ deleted: true, previous: { ... } }`

Also includes helpful information to DELETE requests for resources that are not trashable.

Props timmydcrawford, rmccue, jnylen0.
Fixes #38494.
Built from https://develop.svn.wordpress.org/trunk@39126


git-svn-id: http://core.svn.wordpress.org/trunk@39066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:11:29 +00:00
..
class-wp-rest-attachments-controller.php REST API: Clean-up our validation callbacks and add missing array items properties in our endpoint schemas. 2016-11-03 02:18:29 +00:00
class-wp-rest-comments-controller.php REST API: Modify the structure of our DELETE responses to be more explicit. 2016-11-04 17:11:29 +00:00
class-wp-rest-controller.php REST API: Add support for arrays in schema validation and sanitization. 2016-10-31 01:48:41 +00:00
class-wp-rest-post-statuses-controller.php REST API: Switch to stable version of JSON Schema. 2016-11-03 02:22:29 +00:00
class-wp-rest-post-types-controller.php REST API: Switch to stable version of JSON Schema. 2016-11-03 02:22:29 +00:00
class-wp-rest-posts-controller.php REST API: Modify the structure of our DELETE responses to be more explicit. 2016-11-04 17:11:29 +00:00
class-wp-rest-revisions-controller.php REST API: Modify the structure of our DELETE responses to be more explicit. 2016-11-04 17:11:29 +00:00
class-wp-rest-settings-controller.php REST API: Switch to stable version of JSON Schema. 2016-11-03 02:22:29 +00:00
class-wp-rest-taxonomies-controller.php REST API: Switch to stable version of JSON Schema. 2016-11-03 02:22:29 +00:00
class-wp-rest-terms-controller.php REST API: Modify the structure of our DELETE responses to be more explicit. 2016-11-04 17:11:29 +00:00
class-wp-rest-users-controller.php REST API: Modify the structure of our DELETE responses to be more explicit. 2016-11-04 17:11:29 +00:00