[wp-trac] [WordPress Trac] #38792: REST API: Clean up argument and property types

WordPress Trac noreply at wordpress.org
Tue Nov 15 01:54:51 UTC 2016


#38792: REST API: Clean up argument and property types
--------------------------+-----------------------
 Reporter:  jnylen0       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  4.7
Component:  REST API      |    Version:  trunk
 Severity:  normal        |   Keywords:  has-patch
  Focuses:                |
--------------------------+-----------------------
 Fixes a few remaining issues with argument and property types, found using
 [https://gist.github.com/nylen/9021f6d19157a023a0a8a607a3adb28a this
 script] to automatically check endpoint arguments and item schemas.
 (Current output of the script against trunk is
 [https://gist.github.com/nylen/654cd27be133ddec2647e199b5d3da2a here].)

 - All args/properties should have a type and description
 - All array args/properties should have an item type
 - All `context` and `capabilities` properties should be consistently typed
 - A couple of checks specific to our object properties with `rendered` and
 `raw` fields.

 Follow-up to https://core.trac.wordpress.org/ticket/38531#comment:21.

 Putting this in 4.7 because this is a good change for API consistency and
 because we currently allow some funky things like sending an array as the
 post password, so there are some minor BC implications here.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38792>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list