$property ) { if ( isset( $property['type'] ) ) { // If type is an array, take the first element. if ( is_array( $property['type'] ) ) { $input_schema['properties'][ $property_name ]['type'] = reset( $property['type'] ); } } } } return $input_schema; } }