Merge pull request #21589 from woocommerce/fix/rest-api-product-download-id-schema

[REST API] Fixed schema for product's downloads
This commit is contained in:
Claudiu Lodromanean 2018-10-16 09:54:21 -07:00 committed by GitHub
commit f55efd9b83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 12 deletions

View File

@ -514,10 +514,9 @@ class WC_REST_Product_Variations_Controller extends WC_REST_Product_Variations_V
'type' => 'object',
'properties' => array(
'id' => array(
'description' => __( 'File MD5 hash.', 'woocommerce' ),
'description' => __( 'File ID.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'name' => array(
'description' => __( 'File name.', 'woocommerce' ),

View File

@ -862,10 +862,9 @@ class WC_REST_Products_Controller extends WC_REST_Products_V2_Controller {
'type' => 'object',
'properties' => array(
'id' => array(
'description' => __( 'File MD5 hash.', 'woocommerce' ),
'description' => __( 'File ID.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'name' => array(
'description' => __( 'File name.', 'woocommerce' ),

View File

@ -1882,10 +1882,9 @@ class WC_REST_Products_V1_Controller extends WC_REST_Posts_Controller {
'type' => 'object',
'properties' => array(
'id' => array(
'description' => __( 'File MD5 hash.', 'woocommerce' ),
'description' => __( 'File ID.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'name' => array(
'description' => __( 'File name.', 'woocommerce' ),
@ -2360,10 +2359,9 @@ class WC_REST_Products_V1_Controller extends WC_REST_Posts_Controller {
'type' => 'object',
'properties' => array(
'id' => array(
'description' => __( 'File MD5 hash.', 'woocommerce' ),
'description' => __( 'File ID.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'name' => array(
'description' => __( 'File name.', 'woocommerce' ),

View File

@ -762,10 +762,9 @@ class WC_REST_Product_Variations_V2_Controller extends WC_REST_Products_V2_Contr
'type' => 'object',
'properties' => array(
'id' => array(
'description' => __( 'File MD5 hash.', 'woocommerce' ),
'description' => __( 'File ID.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'name' => array(
'description' => __( 'File name.', 'woocommerce' ),

View File

@ -1606,10 +1606,9 @@ class WC_REST_Products_V2_Controller extends WC_REST_Legacy_Products_Controller
'type' => 'object',
'properties' => array(
'id' => array(
'description' => __( 'File MD5 hash.', 'woocommerce' ),
'description' => __( 'File ID.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'name' => array(
'description' => __( 'File name.', 'woocommerce' ),