Automattic\WooCommerce\Admin\Features\Blueprint

RestApi::get_import_step_response_schemapublicWC 1.0

Get the schema for the import-step endpoint.

Method of the class: RestApi{}

No Hooks.

Returns

Array.

Usage

$RestApi = new RestApi();
$RestApi->get_import_step_response_schema();

RestApi::get_import_step_response_schema() code WC 9.9.4

public function get_import_step_response_schema() {
	$schema = array(
		'$schema'    => 'http://json-schema.org/draft-04/schema#',
		'title'      => 'import-step',
		'type'       => 'object',
		'properties' => array(
			'success'  => array(
				'type' => 'boolean',
			),
			'messages' => array(
				'type'  => 'array',
				'items' => array(
					'type'       => 'object',
					'properties' => array(
						'message' => array(
							'type' => 'string',
						),
						'type'    => array(
							'type' => 'string',
						),
					),
					'required'   => array( 'message', 'type' ),
				),
			),
		),
		'required'   => array( 'success', 'messages' ),
	);
	return $schema;
}