- Timestamp:
- 11/30/2017 11:09:33 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-test-controller.php
r38832 r42343 19 19 public function get_item_schema() { 20 20 $schema = array( 21 '$schema' => 'http://json-schema.org/draft-04/schema#',22 'title' => 'type',23 'type' => 'object',24 'properties' => array(25 'somestring' => array(26 'type' => 'string',27 'description' => 'A pretty string.',28 'context' => array( 'view' ),21 '$schema' => 'http://json-schema.org/draft-04/schema#', 22 'title' => 'type', 23 'type' => 'object', 24 'properties' => array( 25 'somestring' => array( 26 'type' => 'string', 27 'description' => 'A pretty string.', 28 'context' => array( 'view' ), 29 29 ), 30 'someinteger' => array(31 'type' => 'integer',32 'context' => array( 'view' ),30 'someinteger' => array( 31 'type' => 'integer', 32 'context' => array( 'view' ), 33 33 ), 34 'someboolean' => array(35 'type' => 'boolean',36 'context' => array( 'view' ),34 'someboolean' => array( 35 'type' => 'boolean', 36 'context' => array( 'view' ), 37 37 ), 38 'someurl' => array(39 'type' => 'string',40 'format' => 'uri',41 'context' => array( 'view' ),38 'someurl' => array( 39 'type' => 'string', 40 'format' => 'uri', 41 'context' => array( 'view' ), 42 42 ), 43 'somedate' => array(44 'type' => 'string',45 'format' => 'date-time',46 'context' => array( 'view' ),43 'somedate' => array( 44 'type' => 'string', 45 'format' => 'date-time', 46 'context' => array( 'view' ), 47 47 ), 48 'someemail' => array(49 'type' => 'string',50 'format' => 'email',51 'context' => array( 'view' ),48 'someemail' => array( 49 'type' => 'string', 50 'format' => 'email', 51 'context' => array( 'view' ), 52 52 ), 53 'someenum' => array(54 'type' => 'string',55 'enum' => array( 'a', 'b', 'c' ),56 'context' => array( 'view' ),53 'someenum' => array( 54 'type' => 'string', 55 'enum' => array( 'a', 'b', 'c' ), 56 'context' => array( 'view' ), 57 57 ), 58 'someargoptions' => array(59 'type' => 'integer',60 'required' => true,61 'arg_options' => array(58 'someargoptions' => array( 59 'type' => 'integer', 60 'required' => true, 61 'arg_options' => array( 62 62 'required' => false, 63 63 'sanitize_callback' => '__return_true', 64 64 ), 65 65 ), 66 'somedefault' => array(67 'type' => 'string',68 'enum' => array( 'a', 'b', 'c' ),69 'context' => array( 'view' ),70 'default' => 'a',66 'somedefault' => array( 67 'type' => 'string', 68 'enum' => array( 'a', 'b', 'c' ), 69 'context' => array( 'view' ), 70 'default' => 'a', 71 71 ), 72 72 ),
Note: See TracChangeset
for help on using the changeset viewer.