[wp-trac] [WordPress Trac] #50053: REST API: Support uuid json schema format

WordPress Trac noreply at wordpress.org
Sat May 2 03:16:47 UTC 2020


#50053: REST API: Support uuid json schema format
-------------------------+-------------------------------------------------
 Reporter:               |      Owner:  (none)
  TimothyBlynJacobs      |
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  5.5
Component:  REST API     |    Version:  4.7
 Severity:  normal       |   Keywords:  json-schema needs-patch needs-unit-
  Focuses:  rest-api     |  tests good-first-bug
-------------------------+-------------------------------------------------
 We should add support for `format: "uuid"` in
 `rest_validate_value_from_schema`. We can use the existing `wp_is_uuid`
 function for validation. And I'd imagine `sanitize_text_field` for
 sanitization.

 At the moment, I think we can skip checking for a specific uuid version.

 The list of formats is extensible, but `uuid` is also included as a format
 in the [http://json-schema.org/draft/2019-09/json-schema-
 validation.html#rfc.section.7.3.5 latest specs].

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50053>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list