Opened 7 years ago
Closed 4 years ago
#41605 closed defect (bug) (wontfix)
REST API: Fixed schema for the Page post type is incorrect
Reported by: | johnbillion | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Posts, Post Types | Keywords: | has-patch has-unit-tests dev-feedback |
Focuses: | rest-api | Cc: |
Description
The fixed schema for the page
post type incorrectly states that it supports the excerpt
field. It does not.
In addition, I'm not sure why the schemas for the Post, Page, and Attachment post types are hard-coded instead of relying on post type support.
Attachments (1)
Change History (7)
#1
@
7 years ago
- Keywords has-patch has-unit-tests dev-feedback added; needs-patch needs-unit-tests removed
#3
@
7 years ago
I'm not sure why the schemas for the Post, Page, and Attachment post types are hard-coded instead of relying on post type support.
The idea here was that core post types would always have a fixed schema:
- https://github.com/WP-API/WP-API/commit/a84f48adead9fa40d5cde949034da5b7a2635403
- https://github.com/WP-API/WP-API/pull/844#issuecomment-74586279
I suspect the original conversation is in Slack somewhere...
#4
@
7 years ago
Removing the excerpt
field from the response when querying Pages could be considered a breaking change. What's the best path forward?
Note: See
TracTickets for help on using
tickets.
Hmm, the
attachment
post type also states that it supportscustom-fields
, which it does not.