[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
Mon Sep 12 01:20:10 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: closed
Priority: normal | Milestone:
Component: REST API | Version: 4.7
Severity: normal | Resolution: maybelater
Keywords: | Focuses: rest-api
--------------------------+-------------------------
Changes (by TimothyBlynJacobs):
* status: new => closed
* version: 6.0 => 4.7
* resolution: => maybelater
* milestone: Awaiting Review =>
Comment:
Thanks for the ticket @zebulan!
I think the only function we'd have to update in Core would be
`rest_get_endpoint_args_for_schema.
One issue with moving to `readOnly` is that it means that 3rd party
developers will also have to account for both variations. Since a 3rd
party developer letting a field that was marked as `readOnly` instead of
`readonly` be updated could be a security or data integrity issue, I'm
cautious about implementing such a change.
We could potentially make sure `readonly` is also populated whenever
`readOnly` is set, but I think that detracts from the value of the change
in the first place.
I'm going to go ahead and closed this as "maybe later" for now. But feel
free to continue discussing!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56152#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list