[wp-trac] [WordPress Trac] #50301: Missing args properties when WP_REST_Controller::get_endpoint_args_for_item_schema being used

WordPress Trac noreply at wordpress.org
Tue Jun 2 14:37:10 UTC 2020


#50301: Missing args properties when
WP_REST_Controller::get_endpoint_args_for_item_schema being used
-------------------------------------------------+-------------------------
 Reporter:  pentatonicfunk                       |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  5.5
Component:  REST API                             |     Version:  4.7
 Severity:  normal                               |  Resolution:
 Keywords:  needs-patch needs-unit-tests good-   |     Focuses:  rest-api
  first-bug                                      |
-------------------------------------------------+-------------------------
Changes (by TimothyBlynJacobs):

 * keywords:   => needs-patch needs-unit-tests good-first-bug
 * version:  5.4.1 => 4.7
 * milestone:  Awaiting Review => 5.5


Comment:

 Thanks for the ticket @pentatonicfunk!

 Yeah we need to update the list of properties in
 `get_endpoint_args_for_item_schema` here https://github.com/WordPress
 /wordpress-develop/blob/9bea5b3444a25d9c56aa7b04ef4cf0d1fb64703d/src/wp-
 includes/rest-api/endpoints/class-wp-rest-controller.php#L657. It should
 match all the keywords here: https://github.com/WordPress/wordpress-
 develop/blob/9bea5b3444a25d9c56aa7b04ef4cf0d1fb64703d/src/wp-includes
 /rest-api.php#L1259

 We should probably declare that list of allowed properties at the top of
 `get_endpoint_args_for_item_schema` as well.

 Would you be interested in working on a patch for this @pentatonicfunk?

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


More information about the wp-trac mailing list