Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #35574, comment 27


Ignore:
Timestamp:
04/11/2017 06:09:11 AM (8 years ago)
Author:
rmccue
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35574, comment 27

    initial v1  
    1 IMO, if it returns something similar but not identical, it shouldn't be called the same thing. If it's not a full schema object, it should definitely be called something different. Potentially, `WP_Wiget` could have the `get_item_schema` which adds those properties automatically, with `properties => $this->get_schema_for_properties()`
     1IMO, if it returns something similar but not identical, it shouldn't be called the same thing. If it's not a full schema object, it should definitely be called something different. Potentially, `WP_Widget` could have the `get_item_schema` which adds those properties automatically, with `properties => $this->get_schema_for_properties()`
    22
    33Also, I haven't mentioned this here previously, but I have in Slack: I am -1 on reusing JSON Schema directly for internal usage. Using JSON Schema ties the internal behaviour of WordPress to a single serialisation formation (JSON) which doesn't have the same semantics as internal PHP types. I would rather we design our own type system which matches our requirements, which has JSON Schema as an output format.