[wp-trac] [WordPress Trac] #38583: Support for objects in schema validation and sanitization
WordPress Trac
noreply at wordpress.org
Mon Oct 23 18:59:27 UTC 2017
#38583: Support for objects in schema validation and sanitization
----------------------------------------+-----------------------
Reporter: rachelbaker | Owner: rmccue
Type: enhancement | Status: reopened
Priority: high | Milestone: 4.9
Component: REST API | Version: 4.7
Severity: major | Resolution:
Keywords: has-unit-tests needs-patch | Focuses:
----------------------------------------+-----------------------
Comment (by joehoyle):
Ok - thanks all for bearing with me! So, I think we should:
- Default to not stripping un-registered properties unless
`additionalProperties` is `false`.
- The automated schema writing for Meta and Settings will set
`additionalProperties = false`
- We won't support other `additionalProperties` stuff just yet, but we are
defaulting to pass through we it can be additive later.
This means all custom endpoints that don't bother to set
`additionalProperties` will get all the data (registered or not) just like
the root object behaves.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38583#comment:39>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list