mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-08 19:20:03 +00:00
Code is Poetry.
WordPress' code just... wasn't. This is now dealt with. Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS. Fixes #41057. git-svn-id: https://develop.svn.wordpress.org/trunk@42343 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -18,56 +18,56 @@ class WP_REST_Test_Controller extends WP_REST_Controller {
|
||||
*/
|
||||
public function get_item_schema() {
|
||||
$schema = array(
|
||||
'$schema' => 'http://json-schema.org/draft-04/schema#',
|
||||
'title' => 'type',
|
||||
'type' => 'object',
|
||||
'properties' => array(
|
||||
'somestring' => array(
|
||||
'type' => 'string',
|
||||
'description' => 'A pretty string.',
|
||||
'context' => array( 'view' ),
|
||||
'$schema' => 'http://json-schema.org/draft-04/schema#',
|
||||
'title' => 'type',
|
||||
'type' => 'object',
|
||||
'properties' => array(
|
||||
'somestring' => array(
|
||||
'type' => 'string',
|
||||
'description' => 'A pretty string.',
|
||||
'context' => array( 'view' ),
|
||||
),
|
||||
'someinteger' => array(
|
||||
'type' => 'integer',
|
||||
'context' => array( 'view' ),
|
||||
'someinteger' => array(
|
||||
'type' => 'integer',
|
||||
'context' => array( 'view' ),
|
||||
),
|
||||
'someboolean' => array(
|
||||
'type' => 'boolean',
|
||||
'context' => array( 'view' ),
|
||||
'someboolean' => array(
|
||||
'type' => 'boolean',
|
||||
'context' => array( 'view' ),
|
||||
),
|
||||
'someurl' => array(
|
||||
'type' => 'string',
|
||||
'format' => 'uri',
|
||||
'context' => array( 'view' ),
|
||||
'someurl' => array(
|
||||
'type' => 'string',
|
||||
'format' => 'uri',
|
||||
'context' => array( 'view' ),
|
||||
),
|
||||
'somedate' => array(
|
||||
'type' => 'string',
|
||||
'format' => 'date-time',
|
||||
'context' => array( 'view' ),
|
||||
'somedate' => array(
|
||||
'type' => 'string',
|
||||
'format' => 'date-time',
|
||||
'context' => array( 'view' ),
|
||||
),
|
||||
'someemail' => array(
|
||||
'type' => 'string',
|
||||
'format' => 'email',
|
||||
'context' => array( 'view' ),
|
||||
'someemail' => array(
|
||||
'type' => 'string',
|
||||
'format' => 'email',
|
||||
'context' => array( 'view' ),
|
||||
),
|
||||
'someenum' => array(
|
||||
'type' => 'string',
|
||||
'enum' => array( 'a', 'b', 'c' ),
|
||||
'context' => array( 'view' ),
|
||||
'someenum' => array(
|
||||
'type' => 'string',
|
||||
'enum' => array( 'a', 'b', 'c' ),
|
||||
'context' => array( 'view' ),
|
||||
),
|
||||
'someargoptions' => array(
|
||||
'type' => 'integer',
|
||||
'required' => true,
|
||||
'arg_options' => array(
|
||||
'someargoptions' => array(
|
||||
'type' => 'integer',
|
||||
'required' => true,
|
||||
'arg_options' => array(
|
||||
'required' => false,
|
||||
'sanitize_callback' => '__return_true',
|
||||
),
|
||||
),
|
||||
'somedefault' => array(
|
||||
'type' => 'string',
|
||||
'enum' => array( 'a', 'b', 'c' ),
|
||||
'context' => array( 'view' ),
|
||||
'default' => 'a',
|
||||
'somedefault' => array(
|
||||
'type' => 'string',
|
||||
'enum' => array( 'a', 'b', 'c' ),
|
||||
'context' => array( 'view' ),
|
||||
'default' => 'a',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user