[wp-trac] [WordPress Trac] #48785: REST API: WP_REST_Controller::get_public_item_schema() assumes that the schema has properties.

WordPress Trac noreply at wordpress.org
Wed Feb 19 23:53:51 UTC 2020


#48785: REST API: WP_REST_Controller::get_public_item_schema() assumes that the
schema has properties.
-----------------------------------------------------+---------------------
 Reporter:  pento                                    |       Owner:  (none)
     Type:  defect (bug)                             |      Status:  new
 Priority:  normal                                   |   Milestone:  5.4
Component:  REST API                                 |     Version:  4.7
 Severity:  normal                                   |  Resolution:
 Keywords:  good-first-bug has-patch has-unit-tests  |     Focuses:
-----------------------------------------------------+---------------------

Comment (by TimothyBlynJacobs):

 Thanks for working on a test for this @johnwatkins0!

 I think it'd be better if we created a new `WP_REST_Test_Controller` that
 accepted in its constructor a schema. That way we'd be able to reuse the
 controller for any schema related controller tests.

 Perhaps something along the lines of
 `WP_REST_Test_Configurable_Controller`?

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


More information about the wp-trac mailing list