Repository navigation
REST API: Don't list the data_processing settings in the index. - #15183
jorgefilipecosta wants to merge 1 commit into
Conversation
The root index, the namespace indexes and OPTIONS responses described the resolved `data_processing` settings of every endpoint that turns a feature off. The option configures how the server processes a response, so the index does not need to describe it. Follow-up to [64689]. See #66372.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
Followed the testing steps on 7.2-beta3-64990. |
Follow-up to #14671 (https://core.trac.wordpress.org/changeset/64689).
This PR stops listing the resolved
data_processingsettings in the root index, the namespace indexes and OPTIONS responses. The option configures how the server processes a response, nothing reads it from the index, and it is new in 7.2, so it can still change before the release.WP_REST_Server::get_data_for_route()no longer addsdata_processingto the endpoint data.Trac ticket: https://core.trac.wordpress.org/ticket/66372
Testing
Register a trivial endpoint that turns the processing off, for example as a mu-plugin:
curl -X OPTIONS http://localhost:8889/wp-json/demo/v1/hello. On trunk the endpoint carries"data_processing":{"fields":false,"embed":false,"links":false}; with this PR it is{"methods":["GET"],"args":[]}only. The key disappears fromhttp://localhost:8889/wp-json/demo/v1andhttp://localhost:8889/wp-json/the same way.curl 'http://localhost:8889/wp-json/demo/v1/hello?_fields=nope'. It still returns{"hello":"world"}without_links, so the option itself keeps working.Drafted with AI assistance (Claude Code) and reviewed by me.