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

WordPress Trac noreply at wordpress.org
Tue Jan 7 22:42:35 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  |     Focuses:
--------------------------------------+---------------------

Comment (by TimothyBlynJacobs):

 Thanks for the patch @nsundberg. There should be another layer of a
 wrapping array around the wrapping you added. In other words, each
 relation should be an array of links, where each link is an array with an
 `href` key.

 For example the following JSON is expected.

 {{{
 {
   "_links": {
     "self": [
       {
         "href": "https://"
       }
     ]
   }
 }
 }}}

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


More information about the wp-trac mailing list