WC_REST_System_Status_Tools_Controller::get_item_schema PHP Method

get_item_schema() public method

Get the system status tools schema, conforming to JSON Schema.
public get_item_schema ( ) : array
return array
    public function get_item_schema()
    {
        $schema = array('$schema' => 'http://json-schema.org/draft-04/schema#', 'title' => 'system_status_tool', 'type' => 'object', 'properties' => array('id' => array('description' => __('A unique identifier for the tool.', 'woocommerce'), 'type' => 'string', 'context' => array('view', 'edit'), 'arg_options' => array('sanitize_callback' => 'sanitize_title')), 'name' => array('description' => __('Tool name.', 'woocommerce'), 'type' => 'string', 'context' => array('view', 'edit'), 'arg_options' => array('sanitize_callback' => 'sanitize_text_field')), 'action' => array('description' => __('What running the tool will do.', 'woocommerce'), 'type' => 'string', 'context' => array('view', 'edit'), 'arg_options' => array('sanitize_callback' => 'sanitize_text_field')), 'description' => array('description' => __('Tool description.', 'woocommerce'), 'type' => 'string', 'context' => array('view', 'edit'), 'arg_options' => array('sanitize_callback' => 'sanitize_text_field')), 'success' => array('description' => __('Did the tool run successfully?', 'woocommerce'), 'type' => 'boolean', 'context' => array('edit')), 'message' => array('description' => __('Tool return message.', 'woocommerce'), 'type' => 'string', 'context' => array('edit'), 'arg_options' => array('sanitize_callback' => 'sanitize_text_field'))));
        return $this->add_additional_fields_schema($schema);
    }