[wp-trac] [WordPress Trac] #51025: Add support for the anyOf and oneOf JSON Schema keywords.
WordPress Trac
noreply at wordpress.org
Tue Oct 20 18:22:55 UTC 2020
#51025: Add support for the anyOf and oneOf JSON Schema keywords.
-------------------------------------------------+-------------------------
Reporter: TimothyBlynJacobs | Owner:
| TimothyBlynJacobs
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.6
Component: REST API | Version:
Severity: normal | Resolution: fixed
Keywords: json-schema has-patch has-unit- | Focuses:
tests commit |
-------------------------------------------------+-------------------------
Changes (by TimothyBlynJacobs):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"49246" 49246]:
{{{
#!CommitTicketReference repository="" revision="49246"
REST API: Add support for the oneOf and anyOf keywords.
This allows for REST API routes to define more complex validation
requirements as JSON Schema instead of procedural validation.
The error code returned from `rest_validate_value_from_schema` for invalid
parameter types has been changed from the generic `rest_invalid_param` to
the more specific `rest_invalid_type`.
Props yakimun, johnbillion, TimothyBlynJacobs.
Fixes #51025.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51025#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list