Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#51021 closed defect (bug) (fixed)

Permit uniqueItems keyword in endpoint args

Reported by: timothyblynjacobs's profile TimothyBlynJacobs Owned by: timothyblynjacobs's profile 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.


4 years ago
#1

  • Keywords has-patch has-unit-tests added

#2 @TimothyBlynJacobs
4 years 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
4 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for backport.

#4 @SergeyBiryukov
4 years ago

  • Keywords commit fixed-major added

#5 @SergeyBiryukov
4 years 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.