[wp-trac] [WordPress Trac] #64139: Abilities API: Normalize input from schema

WordPress Trac noreply at wordpress.org
Wed Oct 22 15:02:45 UTC 2025


#64139: Abilities API: Normalize input from schema
--------------------------------------+---------------------
 Reporter:  gziolo                    |       Owner:  gziolo
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  6.9
Component:  General                   |     Version:  trunk
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------
Changes (by gziolo):

 * owner:  (none) => gziolo
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"61047" 61047]:
 {{{
 #!CommitTicketReference repository="" revision="61047"
 Abilities API: Normalize input from schema

 Without this patch REST API would require a weird empty `?input` field for
 optional input given how the current controller works with input schema
 when it defines the expected shape. This patch normalizes the input for
 the ability, applying the default value from the input schema when needed.

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

 Follow-up [61032], [61045].

 Props gziolo, jorgefilipecosta, mukesh27.
 Fixes #64139.
 }}}

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


More information about the wp-trac mailing list