REST API: Support the minProperties and maxProperties JSON Schema keywords.

Props yakimun.
Fixes #51023.


git-svn-id: https://develop.svn.wordpress.org/trunk@49053 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Timothy Jacobs
2020-09-26 18:18:53 +00:00
parent 9aa0e0c92b
commit d5c2c86bd8
4 changed files with 71 additions and 1 deletions

View File

@@ -291,7 +291,7 @@ class WP_Test_REST_Controller extends WP_Test_REST_TestCase {
$this->assertArrayHasKey( $property, $args['somearray'] );
}
foreach ( array( 'properties', 'additionalProperties' ) as $property ) {
foreach ( array( 'properties', 'additionalProperties', 'minProperties', 'maxProperties' ) as $property ) {
$this->assertArrayHasKey( $property, $args['someobject'] );
}