[wp-trac] [WordPress Trac] #51757: REST API: Add const validation
WordPress Trac
noreply at wordpress.org
Thu Nov 12 00:42:22 UTC 2020
#51757: REST API: Add const validation
-------------------------+-----------------------------
Reporter: ajlende | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: trunk
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
The `const` keyword is a useful shorthand for pattern matching with
`oneOf`.
> Use of this keyword is functionally equivalent to an "enum" with a
single value.
See https://json-schema.org/draft/2019-09/json-schema-
validation.html#rfc.section.6.1.3
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51757>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list