REST API: Clean-up our validation callbacks and add missing array items properties in our endpoint schemas.

Props joehoyle, jnylen0.
Fixes #38617.

git-svn-id: https://develop.svn.wordpress.org/trunk@39105 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Rachel Baker
2016-11-03 02:17:39 +00:00
parent 25b892c1ca
commit baf52c815a
12 changed files with 294 additions and 89 deletions
@@ -594,7 +594,6 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
'description' => __( 'Limit result set to attachments of a particular media type.' ),
'type' => 'string',
'enum' => array_keys( $media_types ),
'validate_callback' => 'rest_validate_request_arg',
);
$params['mime_type'] = array(