[wp-trac] [WordPress Trac] #50244: Add bulk operation support to the Rest API

WordPress Trac noreply at wordpress.org
Sat Sep 5 18:08:01 UTC 2020


#50244: Add bulk operation support to the Rest API
--------------------------------------------+------------------------------
 Reporter:  andraganescu                    |       Owner:
                                            |  TimothyBlynJacobs
     Type:  feature request                 |      Status:  assigned
 Priority:  high                            |   Milestone:  5.6
Component:  REST API                        |     Version:  4.4
 Severity:  normal                          |  Resolution:
 Keywords:  early has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------------+------------------------------

Comment (by TimothyBlynJacobs):

 In [changeset:"48945" 48945]:
 {{{
 #!CommitTicketReference repository="" revision="48945"
 REST API: Support a route-level validation callback.

 Most request data is validated on a per-parameter basis. Often, however,
 additional validation is needed that operates on the entire request
 object. Currently, this is done in the route callback and often in the
 `prepare_item_for_database` method specifically.

 #50244 aims to introduce batch processing in the REST API. An important
 feature is the ability to enforce that all requests have valid data before
 executing the route callbacks in "pre-validate" mode.

 This patch introduces support for calling a `validate_callback` after all
 parameter validation has succeeded. That allows moving more validation
 outside of the route callback and into `WP_REST_Request` which will
 improve "pre-validate" support.

 Props TimothyBlynJacobs, zieladam.
 Fixes #51255.
 See #50244.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50244#comment:31>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list