[wp-trac] [WordPress Trac] #49147: Incorrect formatting of _links on OPTIONS request to embedded collections

WordPress Trac noreply at wordpress.org
Mon Feb 17 17:27:32 UTC 2020


#49147: Incorrect formatting of _links on OPTIONS request to embedded collections
-----------------------------------------------------+---------------------
 Reporter:  nsundberg                                |       Owner:  (none)
     Type:  defect (bug)                             |      Status:  new
 Priority:  normal                                   |   Milestone:  5.4
Component:  REST API                                 |     Version:  4.4
 Severity:  normal                                   |  Resolution:
 Keywords:  good-first-bug has-patch has-unit-tests  |     Focuses:
-----------------------------------------------------+---------------------

Comment (by TimothyBlynJacobs):

 @birgire We don't treat `self` special, the REST API allows for any link
 relation to have multiple links for it so we enforce that each link
 relation is an array, even if it would only ever have one link.

 Thanks for adding the tests @johnwatkins0! Instead of creating a `new
 WP_REST_Server` can we use `rest_get_server()` here?

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


More information about the wp-trac mailing list