[wp-trac] [WordPress Trac] #56152: REST JSON schema "readonly" prop does not match capitalization of JSON Schema standard (which uses "readOnly")

WordPress Trac noreply at wordpress.org
Tue Jul 5 16:25:28 UTC 2022


#56152: REST JSON schema "readonly" prop does not match capitalization of JSON
Schema standard (which uses "readOnly")
--------------------------+-----------------------------
 Reporter:  zebulan       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  REST API      |    Version:  6.0
 Severity:  normal        |   Keywords:
  Focuses:  rest-api      |
--------------------------+-----------------------------
 The WordPress implementation of JSON schema for the REST API supports a
 "readonly" prop. But in the actual JSON Schema standard, this prop is
 supposed to use camelCase like so: "readOnly".

 https://json-schema.org/draft/2019-09/json-schema-
 validation.html#rfc.section.9.4

 I assume the best way to fix this without breaking backwards compatibility
 would be to support both variants and deprecate usage of the all-lowercase
 one.

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


More information about the wp-trac mailing list