mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-25 05:34:32 +00:00
REST API: Support the uuid JSON Schema format.
This accepts a uuid of any version. A future commit could add support for restricting uuids to a specific version. Props johnwatkins0. Fixes #50053. git-svn-id: https://develop.svn.wordpress.org/trunk@47753 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -69,6 +69,11 @@ class WP_REST_Test_Controller extends WP_REST_Controller {
|
||||
'format' => 'hex-color',
|
||||
'context' => array( 'view' ),
|
||||
),
|
||||
'someuuid' => array(
|
||||
'type' => 'string',
|
||||
'format' => 'uuid',
|
||||
'context' => array( 'view' ),
|
||||
),
|
||||
'someenum' => array(
|
||||
'type' => 'string',
|
||||
'enum' => array( 'a', 'b', 'c' ),
|
||||
|
||||
Reference in New Issue
Block a user