From 5686e6622b05e894ac94570937d9befee8d8d336 Mon Sep 17 00:00:00 2001 From: Matthew Reishus Date: Mon, 8 Nov 2021 10:06:04 -0600 Subject: [PATCH] Add extra definitions to vertical_id and orientations fields --- .../class-wpcom-rest-api-v2-endpoint-external-media.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-external-media.php b/projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-external-media.php index ac90eaf286c1b..d60adfd1d4d87 100644 --- a/projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-external-media.php +++ b/projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-external-media.php @@ -53,13 +53,15 @@ class WPCOM_REST_API_V2_Endpoint_External_Media extends WP_REST_Controller { 'additionalProperties' => false, 'properties' => array( 'vertical_id' => array( - 'type' => 'string', + 'type' => 'string', + 'format' => 'text-field', ), 'pexels_object' => array( 'type' => 'object', ), 'orientations' => array( 'type' => 'array', + 'enum' => array( 'landscape', 'portrait', 'square' ), ), ), ),