[wp-trac] [WordPress Trac] #64252: Fix: Core abilities schemas.

WordPress Trac noreply at wordpress.org
Mon Nov 17 10:56:22 UTC 2025


#64252: Fix: Core abilities schemas.
------------------------------------+-------------------------------
 Reporter:  jorgefilipecosta        |       Owner:  jorgefilipecosta
     Type:  defect (bug)            |      Status:  closed
 Priority:  normal                  |   Milestone:  6.9
Component:  General                 |     Version:
 Severity:  normal                  |  Resolution:  fixed
 Keywords:  has-patch dev-reviewed  |     Focuses:
------------------------------------+-------------------------------
Changes (by jorgefilipecosta):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"61252" 61252]:
 {{{
 #!CommitTicketReference repository="" revision="61252"
 Fix: Core abilities invalid schemas (has examples and returns empty array
 intested of object).

 This commit fixes two issues with the core abilities schemas we have:
 - They have examples on the schema with is not complient with the version
 draft-04 of schema JSON we are using.
 - The top level defaults are defined as an empty array and they are of
 type object, but a php empty array gets JSON serialized and returned in
 the rest API as [] instead of {}, causing problems on the client
 validation.

 Developed in https://github.com/WordPress/wordpress-develop/pull/10510.

 Props jorgefilipecosta, gziolo.
 Fixes #64252.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64252#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list