- 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' 22 'title' 23 'type' 24 'properties' 25 'somestring' 26 'type' 27 'description' 28 'context' 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' 31 'type' 32 'context' 30 'someinteger' => array( 31 'type' => 'integer', 32 'context' => array( 'view' ), 33 33 ), 34 'someboolean' 35 'type' 36 'context' 34 'someboolean' => array( 35 'type' => 'boolean', 36 'context' => array( 'view' ), 37 37 ), 38 'someurl' 39 'type' 40 'format' 41 'context' 38 'someurl' => array( 39 'type' => 'string', 40 'format' => 'uri', 41 'context' => array( 'view' ), 42 42 ), 43 'somedate' 44 'type' 45 'format' 46 'context' 43 'somedate' => array( 44 'type' => 'string', 45 'format' => 'date-time', 46 'context' => array( 'view' ), 47 47 ), 48 'someemail' 49 'type' 50 'format' 51 'context' 48 'someemail' => array( 49 'type' => 'string', 50 'format' => 'email', 51 'context' => array( 'view' ), 52 52 ), 53 'someenum' 54 'type' 55 'enum' 56 'context' 53 'someenum' => array( 54 'type' => 'string', 55 'enum' => array( 'a', 'b', 'c' ), 56 'context' => array( 'view' ), 57 57 ), 58 'someargoptions' 59 'type' 60 'required' 61 'arg_options' 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' 67 'type' 68 'enum' 69 'context' 70 'default' 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.