Make WordPress Core


Ignore:
Timestamp:
06/07/2020 10:40:16 PM (4 years ago)
Author:
TimothyBlynJacobs
Message:

REST API: Support the (min|max)Items JSON Schema keywords.

A future commit will add support for the uniqueItems keyword.

Props sorenbronsted.
See #48821.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-controller.php

    r47913 r47923  
    265265
    266266        $this->assertArrayHasKey( 'items', $args['somearray'] );
     267
     268        foreach ( array( 'minItems', 'maxItems' ) as $property ) {
     269            $this->assertArrayHasKey( $property, $args['somearray'] );
     270        }
    267271
    268272        foreach ( array( 'properties', 'additionalProperties' ) as $property ) {
Note: See TracChangeset for help on using the changeset viewer.