WC_REST_Reports_V1_Controller::get_item_schema() public WC 1.0
Get the Report's schema, conforming to JSON Schema.
{} It's a method of the class: WC_REST_Reports_V1_Controller{}
No Hooks.
Return
Array.
Usage
$WC_REST_Reports_V1_Controller = new WC_REST_Reports_V1_Controller(); $WC_REST_Reports_V1_Controller->get_item_schema();
Code of WC_REST_Reports_V1_Controller::get_item_schema() WC REST Reports V1 Controller::get item schema WC 5.0.0
public function get_item_schema() {
$schema = array(
'$schema' => 'http://json-schema.org/draft-04/schema#',
'title' => 'report',
'type' => 'object',
'properties' => array(
'slug' => array(
'description' => __( 'An alphanumeric identifier for the resource.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view' ),
'readonly' => true,
),
'description' => array(
'description' => __( 'A human-readable description of the resource.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view' ),
'readonly' => true,
),
),
);
return $this->add_additional_fields_schema( $schema );
}