Changes between Version 2 and Version 3 of Ticket #53417
- Timestamp:
- 06/15/2021 11:29:55 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #53417 – Description
v2 v3 1 The schema provided by the REST API endpoints for revisions at `wp/v2/posts/{id}/revisions` and `wp/v2/pages/{id}/revisions` is incorrect. The schema states that a `content.protected` property exists for each revision, but this property doesnot exist.1 The schema provided by the REST API endpoints for revisions at `wp/v2/posts/{id}/revisions` and `wp/v2/pages/{id}/revisions` is incorrect. The schema states that `content.protected` and `excerpt.protected` properties exist for each revision, but these properties do not exist. 2 2 3 3 * [https://github.com/WordPress/wordpress-develop/blob/afee26086fea307c2a5c31c0e2018cb6acd598f7/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php#L736 The schema is constructed here] from the parent controller for posts, which does include this property 4 * [https://github.com/WordPress/wordpress-develop/blob/afee26086fea307c2a5c31c0e2018cb6acd598f7/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php#L600-L604 When the data is prepared here] the `protected` property is not included 4 * [https://github.com/WordPress/wordpress-develop/blob/afee26086fea307c2a5c31c0e2018cb6acd598f7/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php#L600-L604 When the content data is prepared here] the `protected` property is not included 5 * [https://github.com/WordPress/wordpress-develop/blob/afee26086fea307c2a5c31c0e2018cb6acd598f7/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php#L608-L611 When the excerpt data is prepared here] the `protected` property is not included 5 6 6 7 Two options: 7 8 8 1. Remove the `content.protected` propertyfrom the schema9 2. Add the `content.protected` propertyto the response9 1. Remove the `content.protected` and `excerpt.protected` properties from the schema 10 2. Add the `content.protected` and `excerpt.protected` properties to the response 10 11 11 12 Here is the `content` property from the schema. Note the `protected.context` property states that the property exists for all three contexts.