[wp-trac] [WordPress Trac] #38583: Support for objects in schema validation and sanitization

WordPress Trac noreply at wordpress.org
Wed Oct 4 06:23:57 UTC 2017


#38583: Support for objects in schema validation and sanitization
-------------------------------------------------+-------------------------
 Reporter:  rachelbaker                          |       Owner:  rmccue
     Type:  enhancement                          |      Status:  reviewing
 Priority:  high                                 |   Milestone:  4.9
Component:  REST API                             |     Version:  4.7
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests dev-        |     Focuses:
  feedback                                       |
-------------------------------------------------+-------------------------

Comment (by joehoyle):

 38583.1.diff is looking good to me, I don't think it would be right to go
 with 38583.2.diff at this point. It could be considered after adding basic
 object support, but the two should be separate. Thanks for all the work on
 it though, that's a big patch!

 For 38583.1.diff this looks mostly good. I think we shouldn't support
 additionalProperties for now, the point of the schema is to whitelist data
 and types into the REST API (and out), so I'm not sure I see a long term
 path for it; but again, let's get basic object support before putting a
 nail in that coffin.

 I can clean up 38583.1.diff to remove those, test etc.

 We also ideally need to look at `register_meta` / `register_setting` to
 make sure they also handle the extra types, else this is only useful to
 `register_rest_field` and custom controllers / endpoints.

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


More information about the wp-trac mailing list