WordPress.org

Make WordPress Core

Opened 5 weeks ago

Closed 5 weeks ago

#51021 closed defect (bug) (fixed)

Permit uniqueItems keyword in endpoint args

Reported by: TimothyBlynJacobs Owned by: TimothyBlynJacobs
Milestone: 5.5.1 Priority: normal
Severity: normal Version: 5.5
Component: REST API Keywords: has-patch has-unit-tests commit fixed-major
Focuses: Cc:

Description

Support for the uniqueItems keyword was added in [48357]. However, I neglected to add the keyword to the list of valid properties in WP_REST_Server::get_endpoint_args_for_item_schema. This means the keyword won't be automatically added to the args definition if used in a schema.

Change History (5)

This ticket was mentioned in PR #481 on WordPress/wordpress-develop by TimothyBJacobs.


5 weeks ago

  • Keywords has-patch has-unit-tests added

#2 @TimothyBlynJacobs
5 weeks ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 48796:

REST API: Add uniqueItems as a permitted endpoint argument JSON Schema keyword.

Support for the uniqueItems keyword was added in [48357], but wasn't included in the list of permitted keywords for WP_REST_Controller::get_endpoint_args_for_item_schema(). This prevented the keyword from being automatically supported if specified in a controller's item schema.

Fixes #51021.

#3 @TimothyBlynJacobs
5 weeks ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for backport.

#4 @SergeyBiryukov
5 weeks ago

  • Keywords commit fixed-major added

#5 @SergeyBiryukov
5 weeks ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 48807:

REST API: Add uniqueItems as a permitted endpoint argument JSON Schema keyword.

Support for the uniqueItems keyword was added in [48357], but wasn't included in the list of permitted keywords for WP_REST_Controller::get_endpoint_args_for_item_schema(). This prevented the keyword from being automatically supported if specified in a controller's item schema.

Props TimothyBlynJacobs.
Merges [48796] to the 5.5 branch.
Fixes #51021.

Note: See TracTickets for help on using tickets.