diff --git a/src/wp-includes/rest-api.php b/src/wp-includes/rest-api.php index 099fa9a64e..1c507e0524 100644 --- a/src/wp-includes/rest-api.php +++ b/src/wp-includes/rest-api.php @@ -1874,6 +1874,43 @@ function rest_find_one_matching_schema( $value, $args, $param, $stop_after_first return $matching_schemas[0]['schema_object']; } +/** + * Get all valid JSON schema properties. + * + * @since 5.6.0 + * + * @return string[] All valid JSON schema properties. + */ +function rest_get_allowed_schema_keywords() { + return array( + 'title', + 'description', + 'default', + 'type', + 'format', + 'enum', + 'items', + 'properties', + 'additionalProperties', + 'patternProperties', + 'minProperties', + 'maxProperties', + 'minimum', + 'maximum', + 'exclusiveMinimum', + 'exclusiveMaximum', + 'multipleOf', + 'minLength', + 'maxLength', + 'pattern', + 'minItems', + 'maxItems', + 'uniqueItems', + 'anyOf', + 'oneOf', + ); +} + /** * Validate a value based on a schema. * @@ -2765,30 +2802,8 @@ function rest_get_endpoint_args_for_schema( $schema, $method = WP_REST_Server::C $schema_properties = ! empty( $schema['properties'] ) ? $schema['properties'] : array(); $endpoint_args = array(); - $valid_schema_properties = array( - 'type', - 'format', - 'enum', - 'items', - 'properties', - 'additionalProperties', - 'patternProperties', - 'minProperties', - 'maxProperties', - 'minimum', - 'maximum', - 'exclusiveMinimum', - 'exclusiveMaximum', - 'multipleOf', - 'minLength', - 'maxLength', - 'pattern', - 'minItems', - 'maxItems', - 'uniqueItems', - 'anyOf', - 'oneOf', - ); + $valid_schema_properties = rest_get_allowed_schema_keywords(); + $valid_schema_properties = array_diff( $valid_schema_properties, array( 'default', 'required' ) ); foreach ( $schema_properties as $field_id => $params ) { @@ -2802,10 +2817,6 @@ function rest_get_endpoint_args_for_schema( $schema, $method = WP_REST_Server::C 'sanitize_callback' => 'rest_sanitize_request_arg', ); - if ( isset( $params['description'] ) ) { - $endpoint_args[ $field_id ]['description'] = $params['description']; - } - if ( WP_REST_Server::CREATABLE === $method && isset( $params['default'] ) ) { $endpoint_args[ $field_id ]['default'] = $params['default']; } diff --git a/src/wp-includes/rest-api/class-wp-rest-server.php b/src/wp-includes/rest-api/class-wp-rest-server.php index 0844819568..3eeefda167 100644 --- a/src/wp-includes/rest-api/class-wp-rest-server.php +++ b/src/wp-includes/rest-api/class-wp-rest-server.php @@ -1380,6 +1380,8 @@ class WP_REST_Server { } } + $allowed_schema_keywords = array_flip( rest_get_allowed_schema_keywords() ); + $route = preg_replace( '#\(\?P<(\w+?)>.*?\)#', '{$1}', $route ); foreach ( $callbacks as $callback ) { @@ -1397,24 +1399,9 @@ class WP_REST_Server { $endpoint_data['args'] = array(); foreach ( $callback['args'] as $key => $opts ) { - $arg_data = array( - 'required' => ! empty( $opts['required'] ), - ); - if ( isset( $opts['default'] ) ) { - $arg_data['default'] = $opts['default']; - } - if ( isset( $opts['enum'] ) ) { - $arg_data['enum'] = $opts['enum']; - } - if ( isset( $opts['description'] ) ) { - $arg_data['description'] = $opts['description']; - } - if ( isset( $opts['type'] ) ) { - $arg_data['type'] = $opts['type']; - } - if ( isset( $opts['items'] ) ) { - $arg_data['items'] = $opts['items']; - } + $arg_data = array_intersect_key( $opts, $allowed_schema_keywords ); + $arg_data['required'] = ! empty( $opts['required'] ); + $endpoint_data['args'][ $key ] = $arg_data; } } diff --git a/tests/phpunit/tests/rest-api/rest-server.php b/tests/phpunit/tests/rest-api/rest-server.php index 9348e315c2..1a8c3e7554 100644 --- a/tests/phpunit/tests/rest-api/rest-server.php +++ b/tests/phpunit/tests/rest-api/rest-server.php @@ -1931,6 +1931,71 @@ class Tests_REST_Server extends WP_Test_REST_TestCase { $this->assertEquals( 400, $response->get_status() ); } + /** + * @ticket 51020 + */ + public function test_get_data_for_route_includes_permitted_schema_keywords() { + $keywords = array( + 'title' => 'Hi', + 'description' => 'World', + 'type' => 'string', + 'default' => 0, + 'format' => 'uri', + 'enum' => array( 'https://example.org' ), + 'items' => array( 'type' => 'string' ), + 'properties' => array( 'a' => array( 'type' => 'string' ) ), + 'additionalProperties' => false, + 'patternProperties' => array( '\d' => array( 'type' => 'string' ) ), + 'minProperties' => 1, + 'maxProperties' => 5, + 'minimum' => 1, + 'maximum' => 5, + 'exclusiveMinimum' => true, + 'exclusiveMaximum' => false, + 'multipleOf' => 2, + 'minLength' => 1, + 'maxLength' => 5, + 'pattern' => '\d', + 'minItems' => 1, + 'maxItems' => 5, + 'uniqueItems' => true, + 'anyOf' => array( + array( 'type' => 'string' ), + array( 'type' => 'integer' ), + ), + 'oneOf' => array( + array( 'type' => 'string' ), + array( 'type' => 'integer' ), + ), + ); + + $param = $keywords; + $param['invalid'] = true; + + $expected = $keywords; + $expected['required'] = false; + + register_rest_route( + 'test-ns/v1', + '/test', + array( + 'methods' => 'POST', + 'callback' => static function () { + return new WP_REST_Response( 'test' ); + }, + 'permission_callback' => '__return_true', + 'args' => array( + 'param' => $param, + ), + ) + ); + + $response = rest_do_request( new WP_REST_Request( 'OPTIONS', '/test-ns/v1/test' ) ); + $args = $response->get_data()['endpoints'][0]['args']; + + $this->assertSameSetsWithIndex( $expected, $args['param'] ); + } + public function _validate_as_integer_123( $value, $request, $key ) { if ( ! is_int( $value ) ) { return new WP_Error( 'some-error', 'This is not valid!' ); diff --git a/tests/qunit/fixtures/wp-api-generated.js b/tests/qunit/fixtures/wp-api-generated.js index 3bc4c811f4..b6b5768f5c 100644 --- a/tests/qunit/fixtures/wp-api-generated.js +++ b/tests/qunit/fixtures/wp-api-generated.js @@ -31,8 +31,8 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view" + "default": "view", + "required": false } } } @@ -53,17 +53,17 @@ mockedApiResponse.Schema = { ], "args": { "validation": { - "required": false, - "default": "normal", + "type": "string", "enum": [ "require-all-validate", "normal" ], - "type": "string" + "default": "normal", + "required": false }, "requests": { - "required": true, "type": "array", + "maxItems": 25, "items": { "type": "object", "properties": { @@ -100,7 +100,8 @@ mockedApiResponse.Schema = { } } } - } + }, + "required": true } } } @@ -125,12 +126,12 @@ mockedApiResponse.Schema = { ], "args": { "namespace": { - "required": false, - "default": "oembed/1.0" + "default": "oembed/1.0", + "required": false }, "context": { - "required": false, - "default": "view" + "default": "view", + "required": false } } } @@ -151,17 +152,18 @@ mockedApiResponse.Schema = { ], "args": { "url": { - "required": true, "description": "The URL of the resource for which to fetch oEmbed data.", - "type": "string" + "type": "string", + "format": "uri", + "required": true }, "format": { - "required": false, - "default": "json" + "default": "json", + "required": false }, "maxwidth": { - "required": false, - "default": 600 + "default": 600, + "required": false } } } @@ -182,36 +184,37 @@ mockedApiResponse.Schema = { ], "args": { "url": { - "required": true, "description": "The URL of the resource for which to fetch oEmbed data.", - "type": "string" + "type": "string", + "format": "uri", + "required": true }, "format": { - "required": false, + "description": "The oEmbed format to use.", + "type": "string", "default": "json", "enum": [ "json", "xml" ], - "description": "The oEmbed format to use.", - "type": "string" + "required": false }, "maxwidth": { - "required": false, - "default": 600, "description": "The maximum width of the embed frame in pixels.", - "type": "integer" + "type": "integer", + "default": 600, + "required": false }, "maxheight": { - "required": false, "description": "The maximum height of the embed frame in pixels.", - "type": "integer" + "type": "integer", + "required": false }, "discover": { - "required": false, - "default": true, "description": "Whether to perform an oEmbed discovery request for unsanctioned providers.", - "type": "boolean" + "type": "boolean", + "default": true, + "required": false } } } @@ -232,12 +235,12 @@ mockedApiResponse.Schema = { ], "args": { "namespace": { - "required": false, - "default": "wp/v2" + "default": "wp/v2", + "required": false }, "context": { - "required": false, - "default": "view" + "default": "view", + "required": false } } } @@ -259,96 +262,102 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "page": { - "required": false, - "default": 1, "description": "Current page of the collection.", - "type": "integer" + "type": "integer", + "default": 1, + "minimum": 1, + "required": false }, "per_page": { - "required": false, - "default": 10, "description": "Maximum number of items to be returned in result set.", - "type": "integer" + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false }, "search": { - "required": false, "description": "Limit results to those matching a string.", - "type": "string" + "type": "string", + "required": false }, "after": { - "required": false, "description": "Limit response to posts published after a given ISO8601 compliant date.", - "type": "string" + "type": "string", + "format": "date-time", + "required": false }, "author": { - "required": false, - "default": [], "description": "Limit result set to posts assigned to specific authors.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "author_exclude": { - "required": false, - "default": [], "description": "Ensure result set excludes posts assigned to specific authors.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "before": { - "required": false, "description": "Limit response to posts published before a given ISO8601 compliant date.", - "type": "string" + "type": "string", + "format": "date-time", + "required": false }, "exclude": { - "required": false, - "default": [], "description": "Ensure result set excludes specific IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "include": { - "required": false, - "default": [], "description": "Limit result set to specific IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "offset": { - "required": false, "description": "Offset the result set by a specific number of items.", - "type": "integer" + "type": "integer", + "required": false }, "order": { - "required": false, + "description": "Order sort attribute ascending or descending.", + "type": "string", "default": "desc", "enum": [ "asc", "desc" ], - "description": "Order sort attribute ascending or descending.", - "type": "string" + "required": false }, "orderby": { - "required": false, + "description": "Sort collection by object attribute.", + "type": "string", "default": "date", "enum": [ "author", @@ -362,19 +371,17 @@ mockedApiResponse.Schema = { "include_slugs", "title" ], - "description": "Sort collection by object attribute.", - "type": "string" + "required": false }, "slug": { - "required": false, "description": "Limit result set to posts with one or more specific slugs.", "type": "array", "items": { "type": "string" - } + }, + "required": false }, "status": { - "required": false, "default": "publish", "description": "Limit result set to posts assigned one or more statuses.", "type": "array", @@ -395,57 +402,58 @@ mockedApiResponse.Schema = { "any" ], "type": "string" - } + }, + "required": false }, "tax_relation": { - "required": false, + "description": "Limit result set based on relationship between multiple taxonomies.", + "type": "string", "enum": [ "AND", "OR" ], - "description": "Limit result set based on relationship between multiple taxonomies.", - "type": "string" + "required": false }, "categories": { - "required": false, - "default": [], "description": "Limit result set to all items that have the specified term assigned in the categories taxonomy.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "categories_exclude": { - "required": false, - "default": [], "description": "Limit result set to all items except those that have the specified term assigned in the categories taxonomy.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "tags": { - "required": false, - "default": [], "description": "Limit result set to all items that have the specified term assigned in the tags taxonomy.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "tags_exclude": { - "required": false, - "default": [], "description": "Limit result set to all items except those that have the specified term assigned in the tags taxonomy.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "sticky": { - "required": false, "description": "Limit result set to items that are sticky.", - "type": "boolean" + "type": "boolean", + "required": false } } }, @@ -455,28 +463,31 @@ mockedApiResponse.Schema = { ], "args": { "date": { - "required": false, "description": "The date the object was published, in the site's timezone.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "date_gmt": { - "required": false, "description": "The date the object was published, as GMT.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "slug": { - "required": false, "description": "An alphanumeric identifier for the object unique to its type.", - "type": "string" + "type": "string", + "required": false }, "status": { - "required": false, + "description": "A named status for the object.", + "type": "string", "enum": [ "publish", "future", @@ -484,59 +495,143 @@ mockedApiResponse.Schema = { "pending", "private" ], - "description": "A named status for the object.", - "type": "string" + "required": false }, "password": { - "required": false, "description": "A password to protect access to the content and excerpt.", - "type": "string" + "type": "string", + "required": false }, "title": { - "required": false, "description": "The title for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Title for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML title for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "content": { - "required": false, "description": "The content for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Content for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML content for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "block_version": { + "description": "Version of the content block format used by the object.", + "type": "integer", + "context": [ + "edit" + ], + "readonly": true + }, + "protected": { + "description": "Whether the content is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "author": { - "required": false, "description": "The ID for the author of the object.", - "type": "integer" + "type": "integer", + "required": false }, "excerpt": { - "required": false, "description": "The excerpt for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Excerpt for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML excerpt for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + }, + "protected": { + "description": "Whether the excerpt is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "featured_media": { - "required": false, "description": "The ID of the featured media for the object.", - "type": "integer" + "type": "integer", + "required": false }, "comment_status": { - "required": false, + "description": "Whether or not comments are open on the object.", + "type": "string", "enum": [ "open", "closed" ], - "description": "Whether or not comments are open on the object.", - "type": "string" + "required": false }, "ping_status": { - "required": false, + "description": "Whether or not the object can be pinged.", + "type": "string", "enum": [ "open", "closed" ], - "description": "Whether or not the object can be pinged.", - "type": "string" + "required": false }, "format": { - "required": false, + "description": "The format for the object.", + "type": "string", "enum": [ "standard", "aside", @@ -549,39 +644,39 @@ mockedApiResponse.Schema = { "video", "audio" ], - "description": "The format for the object.", - "type": "string" + "required": false }, "meta": { - "required": false, "description": "Meta fields.", - "type": "object" + "type": "object", + "properties": [], + "required": false }, "sticky": { - "required": false, "description": "Whether or not the object should be treated as sticky.", - "type": "boolean" + "type": "boolean", + "required": false }, "template": { - "required": false, "description": "The theme file to use to display the object.", - "type": "string" + "type": "string", + "required": false }, "categories": { - "required": false, "description": "The terms assigned to the object in the category taxonomy.", "type": "array", "items": { "type": "integer" - } + }, + "required": false }, "tags": { - "required": false, "description": "The terms assigned to the object in the post_tag taxonomy.", "type": "array", "items": { "type": "integer" - } + }, + "required": false } } } @@ -606,25 +701,25 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the object.", - "type": "integer" + "type": "integer", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "password": { - "required": false, "description": "The password for the post if it is password protected.", - "type": "string" + "type": "string", + "required": false } } }, @@ -636,33 +731,36 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the object.", - "type": "integer" + "type": "integer", + "required": false }, "date": { - "required": false, "description": "The date the object was published, in the site's timezone.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "date_gmt": { - "required": false, "description": "The date the object was published, as GMT.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "slug": { - "required": false, "description": "An alphanumeric identifier for the object unique to its type.", - "type": "string" + "type": "string", + "required": false }, "status": { - "required": false, + "description": "A named status for the object.", + "type": "string", "enum": [ "publish", "future", @@ -670,59 +768,143 @@ mockedApiResponse.Schema = { "pending", "private" ], - "description": "A named status for the object.", - "type": "string" + "required": false }, "password": { - "required": false, "description": "A password to protect access to the content and excerpt.", - "type": "string" + "type": "string", + "required": false }, "title": { - "required": false, "description": "The title for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Title for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML title for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "content": { - "required": false, "description": "The content for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Content for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML content for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "block_version": { + "description": "Version of the content block format used by the object.", + "type": "integer", + "context": [ + "edit" + ], + "readonly": true + }, + "protected": { + "description": "Whether the content is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "author": { - "required": false, "description": "The ID for the author of the object.", - "type": "integer" + "type": "integer", + "required": false }, "excerpt": { - "required": false, "description": "The excerpt for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Excerpt for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML excerpt for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + }, + "protected": { + "description": "Whether the excerpt is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "featured_media": { - "required": false, "description": "The ID of the featured media for the object.", - "type": "integer" + "type": "integer", + "required": false }, "comment_status": { - "required": false, + "description": "Whether or not comments are open on the object.", + "type": "string", "enum": [ "open", "closed" ], - "description": "Whether or not comments are open on the object.", - "type": "string" + "required": false }, "ping_status": { - "required": false, + "description": "Whether or not the object can be pinged.", + "type": "string", "enum": [ "open", "closed" ], - "description": "Whether or not the object can be pinged.", - "type": "string" + "required": false }, "format": { - "required": false, + "description": "The format for the object.", + "type": "string", "enum": [ "standard", "aside", @@ -735,39 +917,39 @@ mockedApiResponse.Schema = { "video", "audio" ], - "description": "The format for the object.", - "type": "string" + "required": false }, "meta": { - "required": false, "description": "Meta fields.", - "type": "object" + "type": "object", + "properties": [], + "required": false }, "sticky": { - "required": false, "description": "Whether or not the object should be treated as sticky.", - "type": "boolean" + "type": "boolean", + "required": false }, "template": { - "required": false, "description": "The theme file to use to display the object.", - "type": "string" + "type": "string", + "required": false }, "categories": { - "required": false, "description": "The terms assigned to the object in the category taxonomy.", "type": "array", "items": { "type": "integer" - } + }, + "required": false }, "tags": { - "required": false, "description": "The terms assigned to the object in the post_tag taxonomy.", "type": "array", "items": { "type": "integer" - } + }, + "required": false } } }, @@ -777,15 +959,15 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the object.", - "type": "integer" + "type": "integer", + "required": false }, "force": { - "required": false, + "type": "boolean", "default": false, "description": "Whether to bypass Trash and force deletion.", - "type": "boolean" + "required": false } } } @@ -803,72 +985,76 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "required": false, "description": "The ID for the parent of the object.", - "type": "integer" + "type": "integer", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "page": { - "required": false, - "default": 1, "description": "Current page of the collection.", - "type": "integer" + "type": "integer", + "default": 1, + "minimum": 1, + "required": false }, "per_page": { - "required": false, "description": "Maximum number of items to be returned in result set.", - "type": "integer" + "type": "integer", + "minimum": 1, + "maximum": 100, + "required": false }, "search": { - "required": false, "description": "Limit results to those matching a string.", - "type": "string" + "type": "string", + "required": false }, "exclude": { - "required": false, - "default": [], "description": "Ensure result set excludes specific IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "include": { - "required": false, - "default": [], "description": "Limit result set to specific IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "offset": { - "required": false, "description": "Offset the result set by a specific number of items.", - "type": "integer" + "type": "integer", + "required": false }, "order": { - "required": false, + "description": "Order sort attribute ascending or descending.", + "type": "string", "default": "desc", "enum": [ "asc", "desc" ], - "description": "Order sort attribute ascending or descending.", - "type": "string" + "required": false }, "orderby": { - "required": false, + "description": "Sort collection by object attribute.", + "type": "string", "default": "date", "enum": [ "date", @@ -879,8 +1065,7 @@ mockedApiResponse.Schema = { "include_slugs", "title" ], - "description": "Sort collection by object attribute.", - "type": "string" + "required": false } } } @@ -899,25 +1084,25 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "required": false, "description": "The ID for the parent of the object.", - "type": "integer" + "type": "integer", + "required": false }, "id": { - "required": false, "description": "Unique identifier for the object.", - "type": "integer" + "type": "integer", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } }, @@ -927,20 +1112,20 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "required": false, "description": "The ID for the parent of the object.", - "type": "integer" + "type": "integer", + "required": false }, "id": { - "required": false, "description": "Unique identifier for the object.", - "type": "integer" + "type": "integer", + "required": false }, "force": { - "required": false, + "type": "boolean", "default": false, "description": "Required to be true, as revisions do not support trashing.", - "type": "boolean" + "required": false } } } @@ -959,20 +1144,20 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "required": false, "description": "The ID for the parent of the object.", - "type": "integer" + "type": "integer", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } }, @@ -982,33 +1167,36 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "required": false, "description": "The ID for the parent of the object.", - "type": "integer" + "type": "integer", + "required": false }, "date": { - "required": false, "description": "The date the object was published, in the site's timezone.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "date_gmt": { - "required": false, "description": "The date the object was published, as GMT.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "slug": { - "required": false, "description": "An alphanumeric identifier for the object unique to its type.", - "type": "string" + "type": "string", + "required": false }, "status": { - "required": false, + "description": "A named status for the object.", + "type": "string", "enum": [ "publish", "future", @@ -1016,59 +1204,143 @@ mockedApiResponse.Schema = { "pending", "private" ], - "description": "A named status for the object.", - "type": "string" + "required": false }, "password": { - "required": false, "description": "A password to protect access to the content and excerpt.", - "type": "string" + "type": "string", + "required": false }, "title": { - "required": false, "description": "The title for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Title for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML title for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "content": { - "required": false, "description": "The content for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Content for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML content for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "block_version": { + "description": "Version of the content block format used by the object.", + "type": "integer", + "context": [ + "edit" + ], + "readonly": true + }, + "protected": { + "description": "Whether the content is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "author": { - "required": false, "description": "The ID for the author of the object.", - "type": "integer" + "type": "integer", + "required": false }, "excerpt": { - "required": false, "description": "The excerpt for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Excerpt for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML excerpt for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + }, + "protected": { + "description": "Whether the excerpt is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "featured_media": { - "required": false, "description": "The ID of the featured media for the object.", - "type": "integer" + "type": "integer", + "required": false }, "comment_status": { - "required": false, + "description": "Whether or not comments are open on the object.", + "type": "string", "enum": [ "open", "closed" ], - "description": "Whether or not comments are open on the object.", - "type": "string" + "required": false }, "ping_status": { - "required": false, + "description": "Whether or not the object can be pinged.", + "type": "string", "enum": [ "open", "closed" ], - "description": "Whether or not the object can be pinged.", - "type": "string" + "required": false }, "format": { - "required": false, + "description": "The format for the object.", + "type": "string", "enum": [ "standard", "aside", @@ -1081,39 +1353,39 @@ mockedApiResponse.Schema = { "video", "audio" ], - "description": "The format for the object.", - "type": "string" + "required": false }, "meta": { - "required": false, "description": "Meta fields.", - "type": "object" + "type": "object", + "properties": [], + "required": false }, "sticky": { - "required": false, "description": "Whether or not the object should be treated as sticky.", - "type": "boolean" + "type": "boolean", + "required": false }, "template": { - "required": false, "description": "The theme file to use to display the object.", - "type": "string" + "type": "string", + "required": false }, "categories": { - "required": false, "description": "The terms assigned to the object in the category taxonomy.", "type": "array", "items": { "type": "integer" - } + }, + "required": false }, "tags": { - "required": false, "description": "The terms assigned to the object in the post_tag taxonomy.", "type": "array", "items": { "type": "integer" - } + }, + "required": false } } } @@ -1131,25 +1403,25 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "required": false, "description": "The ID for the parent of the object.", - "type": "integer" + "type": "integer", + "required": false }, "id": { - "required": false, "description": "The ID for the object.", - "type": "integer" + "type": "integer", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } } @@ -1168,101 +1440,107 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "page": { - "required": false, - "default": 1, "description": "Current page of the collection.", - "type": "integer" + "type": "integer", + "default": 1, + "minimum": 1, + "required": false }, "per_page": { - "required": false, - "default": 10, "description": "Maximum number of items to be returned in result set.", - "type": "integer" + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false }, "search": { - "required": false, "description": "Limit results to those matching a string.", - "type": "string" + "type": "string", + "required": false }, "after": { - "required": false, "description": "Limit response to posts published after a given ISO8601 compliant date.", - "type": "string" + "type": "string", + "format": "date-time", + "required": false }, "author": { - "required": false, - "default": [], "description": "Limit result set to posts assigned to specific authors.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "author_exclude": { - "required": false, - "default": [], "description": "Ensure result set excludes posts assigned to specific authors.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "before": { - "required": false, "description": "Limit response to posts published before a given ISO8601 compliant date.", - "type": "string" + "type": "string", + "format": "date-time", + "required": false }, "exclude": { - "required": false, - "default": [], "description": "Ensure result set excludes specific IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "include": { - "required": false, - "default": [], "description": "Limit result set to specific IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "menu_order": { - "required": false, "description": "Limit result set to posts with a specific menu_order value.", - "type": "integer" + "type": "integer", + "required": false }, "offset": { - "required": false, "description": "Offset the result set by a specific number of items.", - "type": "integer" + "type": "integer", + "required": false }, "order": { - "required": false, + "description": "Order sort attribute ascending or descending.", + "type": "string", "default": "desc", "enum": [ "asc", "desc" ], - "description": "Order sort attribute ascending or descending.", - "type": "string" + "required": false }, "orderby": { - "required": false, + "description": "Sort collection by object attribute.", + "type": "string", "default": "date", "enum": [ "author", @@ -1277,37 +1555,35 @@ mockedApiResponse.Schema = { "title", "menu_order" ], - "description": "Sort collection by object attribute.", - "type": "string" + "required": false }, "parent": { - "required": false, - "default": [], "description": "Limit result set to items with particular parent IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "parent_exclude": { - "required": false, - "default": [], "description": "Limit result set to all items except those of a particular parent ID.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "slug": { - "required": false, "description": "Limit result set to posts with one or more specific slugs.", "type": "array", "items": { "type": "string" - } + }, + "required": false }, "status": { - "required": false, "default": "publish", "description": "Limit result set to posts assigned one or more statuses.", "type": "array", @@ -1328,7 +1604,8 @@ mockedApiResponse.Schema = { "any" ], "type": "string" - } + }, + "required": false } } }, @@ -1338,28 +1615,31 @@ mockedApiResponse.Schema = { ], "args": { "date": { - "required": false, "description": "The date the object was published, in the site's timezone.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "date_gmt": { - "required": false, "description": "The date the object was published, as GMT.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "slug": { - "required": false, "description": "An alphanumeric identifier for the object unique to its type.", - "type": "string" + "type": "string", + "required": false }, "status": { - "required": false, + "description": "A named status for the object.", + "type": "string", "enum": [ "publish", "future", @@ -1367,76 +1647,160 @@ mockedApiResponse.Schema = { "pending", "private" ], - "description": "A named status for the object.", - "type": "string" + "required": false }, "password": { - "required": false, "description": "A password to protect access to the content and excerpt.", - "type": "string" + "type": "string", + "required": false }, "parent": { - "required": false, "description": "The ID for the parent of the object.", - "type": "integer" + "type": "integer", + "required": false }, "title": { - "required": false, "description": "The title for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Title for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML title for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "content": { - "required": false, "description": "The content for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Content for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML content for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "block_version": { + "description": "Version of the content block format used by the object.", + "type": "integer", + "context": [ + "edit" + ], + "readonly": true + }, + "protected": { + "description": "Whether the content is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "author": { - "required": false, "description": "The ID for the author of the object.", - "type": "integer" + "type": "integer", + "required": false }, "excerpt": { - "required": false, "description": "The excerpt for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Excerpt for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML excerpt for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + }, + "protected": { + "description": "Whether the excerpt is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "featured_media": { - "required": false, "description": "The ID of the featured media for the object.", - "type": "integer" + "type": "integer", + "required": false }, "comment_status": { - "required": false, + "description": "Whether or not comments are open on the object.", + "type": "string", "enum": [ "open", "closed" ], - "description": "Whether or not comments are open on the object.", - "type": "string" + "required": false }, "ping_status": { - "required": false, + "description": "Whether or not the object can be pinged.", + "type": "string", "enum": [ "open", "closed" ], - "description": "Whether or not the object can be pinged.", - "type": "string" + "required": false }, "menu_order": { - "required": false, "description": "The order of the object in relation to other object of its type.", - "type": "integer" + "type": "integer", + "required": false }, "meta": { - "required": false, "description": "Meta fields.", - "type": "object" + "type": "object", + "properties": [], + "required": false }, "template": { - "required": false, "description": "The theme file to use to display the object.", - "type": "string" + "type": "string", + "required": false } } } @@ -1461,25 +1825,25 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the object.", - "type": "integer" + "type": "integer", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "password": { - "required": false, "description": "The password for the post if it is password protected.", - "type": "string" + "type": "string", + "required": false } } }, @@ -1491,33 +1855,36 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the object.", - "type": "integer" + "type": "integer", + "required": false }, "date": { - "required": false, "description": "The date the object was published, in the site's timezone.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "date_gmt": { - "required": false, "description": "The date the object was published, as GMT.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "slug": { - "required": false, "description": "An alphanumeric identifier for the object unique to its type.", - "type": "string" + "type": "string", + "required": false }, "status": { - "required": false, + "description": "A named status for the object.", + "type": "string", "enum": [ "publish", "future", @@ -1525,76 +1892,160 @@ mockedApiResponse.Schema = { "pending", "private" ], - "description": "A named status for the object.", - "type": "string" + "required": false }, "password": { - "required": false, "description": "A password to protect access to the content and excerpt.", - "type": "string" + "type": "string", + "required": false }, "parent": { - "required": false, "description": "The ID for the parent of the object.", - "type": "integer" + "type": "integer", + "required": false }, "title": { - "required": false, "description": "The title for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Title for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML title for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "content": { - "required": false, "description": "The content for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Content for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML content for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "block_version": { + "description": "Version of the content block format used by the object.", + "type": "integer", + "context": [ + "edit" + ], + "readonly": true + }, + "protected": { + "description": "Whether the content is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "author": { - "required": false, "description": "The ID for the author of the object.", - "type": "integer" + "type": "integer", + "required": false }, "excerpt": { - "required": false, "description": "The excerpt for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Excerpt for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML excerpt for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + }, + "protected": { + "description": "Whether the excerpt is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "featured_media": { - "required": false, "description": "The ID of the featured media for the object.", - "type": "integer" + "type": "integer", + "required": false }, "comment_status": { - "required": false, + "description": "Whether or not comments are open on the object.", + "type": "string", "enum": [ "open", "closed" ], - "description": "Whether or not comments are open on the object.", - "type": "string" + "required": false }, "ping_status": { - "required": false, + "description": "Whether or not the object can be pinged.", + "type": "string", "enum": [ "open", "closed" ], - "description": "Whether or not the object can be pinged.", - "type": "string" + "required": false }, "menu_order": { - "required": false, "description": "The order of the object in relation to other object of its type.", - "type": "integer" + "type": "integer", + "required": false }, "meta": { - "required": false, "description": "Meta fields.", - "type": "object" + "type": "object", + "properties": [], + "required": false }, "template": { - "required": false, "description": "The theme file to use to display the object.", - "type": "string" + "type": "string", + "required": false } } }, @@ -1604,15 +2055,15 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the object.", - "type": "integer" + "type": "integer", + "required": false }, "force": { - "required": false, + "type": "boolean", "default": false, "description": "Whether to bypass Trash and force deletion.", - "type": "boolean" + "required": false } } } @@ -1630,72 +2081,76 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "required": false, "description": "The ID for the parent of the object.", - "type": "integer" + "type": "integer", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "page": { - "required": false, - "default": 1, "description": "Current page of the collection.", - "type": "integer" + "type": "integer", + "default": 1, + "minimum": 1, + "required": false }, "per_page": { - "required": false, "description": "Maximum number of items to be returned in result set.", - "type": "integer" + "type": "integer", + "minimum": 1, + "maximum": 100, + "required": false }, "search": { - "required": false, "description": "Limit results to those matching a string.", - "type": "string" + "type": "string", + "required": false }, "exclude": { - "required": false, - "default": [], "description": "Ensure result set excludes specific IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "include": { - "required": false, - "default": [], "description": "Limit result set to specific IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "offset": { - "required": false, "description": "Offset the result set by a specific number of items.", - "type": "integer" + "type": "integer", + "required": false }, "order": { - "required": false, + "description": "Order sort attribute ascending or descending.", + "type": "string", "default": "desc", "enum": [ "asc", "desc" ], - "description": "Order sort attribute ascending or descending.", - "type": "string" + "required": false }, "orderby": { - "required": false, + "description": "Sort collection by object attribute.", + "type": "string", "default": "date", "enum": [ "date", @@ -1706,8 +2161,7 @@ mockedApiResponse.Schema = { "include_slugs", "title" ], - "description": "Sort collection by object attribute.", - "type": "string" + "required": false } } } @@ -1726,25 +2180,25 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "required": false, "description": "The ID for the parent of the object.", - "type": "integer" + "type": "integer", + "required": false }, "id": { - "required": false, "description": "Unique identifier for the object.", - "type": "integer" + "type": "integer", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } }, @@ -1754,20 +2208,20 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "required": false, "description": "The ID for the parent of the object.", - "type": "integer" + "type": "integer", + "required": false }, "id": { - "required": false, "description": "Unique identifier for the object.", - "type": "integer" + "type": "integer", + "required": false }, "force": { - "required": false, + "type": "boolean", "default": false, "description": "Required to be true, as revisions do not support trashing.", - "type": "boolean" + "required": false } } } @@ -1786,20 +2240,20 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "required": false, "description": "The ID for the parent of the object.", - "type": "integer" + "type": "integer", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } }, @@ -1809,33 +2263,36 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "required": false, "description": "The ID for the parent of the object.", - "type": "integer" + "type": "integer", + "required": false }, "date": { - "required": false, "description": "The date the object was published, in the site's timezone.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "date_gmt": { - "required": false, "description": "The date the object was published, as GMT.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "slug": { - "required": false, "description": "An alphanumeric identifier for the object unique to its type.", - "type": "string" + "type": "string", + "required": false }, "status": { - "required": false, + "description": "A named status for the object.", + "type": "string", "enum": [ "publish", "future", @@ -1843,71 +2300,155 @@ mockedApiResponse.Schema = { "pending", "private" ], - "description": "A named status for the object.", - "type": "string" + "required": false }, "password": { - "required": false, "description": "A password to protect access to the content and excerpt.", - "type": "string" + "type": "string", + "required": false }, "title": { - "required": false, "description": "The title for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Title for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML title for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "content": { - "required": false, "description": "The content for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Content for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML content for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "block_version": { + "description": "Version of the content block format used by the object.", + "type": "integer", + "context": [ + "edit" + ], + "readonly": true + }, + "protected": { + "description": "Whether the content is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "author": { - "required": false, "description": "The ID for the author of the object.", - "type": "integer" + "type": "integer", + "required": false }, "excerpt": { - "required": false, "description": "The excerpt for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Excerpt for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML excerpt for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + }, + "protected": { + "description": "Whether the excerpt is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "featured_media": { - "required": false, "description": "The ID of the featured media for the object.", - "type": "integer" + "type": "integer", + "required": false }, "comment_status": { - "required": false, + "description": "Whether or not comments are open on the object.", + "type": "string", "enum": [ "open", "closed" ], - "description": "Whether or not comments are open on the object.", - "type": "string" + "required": false }, "ping_status": { - "required": false, + "description": "Whether or not the object can be pinged.", + "type": "string", "enum": [ "open", "closed" ], - "description": "Whether or not the object can be pinged.", - "type": "string" + "required": false }, "menu_order": { - "required": false, "description": "The order of the object in relation to other object of its type.", - "type": "integer" + "type": "integer", + "required": false }, "meta": { - "required": false, "description": "Meta fields.", - "type": "object" + "type": "object", + "properties": [], + "required": false }, "template": { - "required": false, "description": "The theme file to use to display the object.", - "type": "string" + "type": "string", + "required": false } } } @@ -1925,25 +2466,25 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "required": false, "description": "The ID for the parent of the object.", - "type": "integer" + "type": "integer", + "required": false }, "id": { - "required": false, "description": "The ID for the object.", - "type": "integer" + "type": "integer", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } } @@ -1962,96 +2503,102 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "page": { - "required": false, - "default": 1, "description": "Current page of the collection.", - "type": "integer" + "type": "integer", + "default": 1, + "minimum": 1, + "required": false }, "per_page": { - "required": false, - "default": 10, "description": "Maximum number of items to be returned in result set.", - "type": "integer" + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false }, "search": { - "required": false, "description": "Limit results to those matching a string.", - "type": "string" + "type": "string", + "required": false }, "after": { - "required": false, "description": "Limit response to posts published after a given ISO8601 compliant date.", - "type": "string" + "type": "string", + "format": "date-time", + "required": false }, "author": { - "required": false, - "default": [], "description": "Limit result set to posts assigned to specific authors.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "author_exclude": { - "required": false, - "default": [], "description": "Ensure result set excludes posts assigned to specific authors.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "before": { - "required": false, "description": "Limit response to posts published before a given ISO8601 compliant date.", - "type": "string" + "type": "string", + "format": "date-time", + "required": false }, "exclude": { - "required": false, - "default": [], "description": "Ensure result set excludes specific IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "include": { - "required": false, - "default": [], "description": "Limit result set to specific IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "offset": { - "required": false, "description": "Offset the result set by a specific number of items.", - "type": "integer" + "type": "integer", + "required": false }, "order": { - "required": false, + "description": "Order sort attribute ascending or descending.", + "type": "string", "default": "desc", "enum": [ "asc", "desc" ], - "description": "Order sort attribute ascending or descending.", - "type": "string" + "required": false }, "orderby": { - "required": false, + "description": "Sort collection by object attribute.", + "type": "string", "default": "date", "enum": [ "author", @@ -2065,37 +2612,35 @@ mockedApiResponse.Schema = { "include_slugs", "title" ], - "description": "Sort collection by object attribute.", - "type": "string" + "required": false }, "parent": { - "required": false, - "default": [], "description": "Limit result set to items with particular parent IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "parent_exclude": { - "required": false, - "default": [], "description": "Limit result set to all items except those of a particular parent ID.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "slug": { - "required": false, "description": "Limit result set to posts with one or more specific slugs.", "type": "array", "items": { "type": "string" - } + }, + "required": false }, "status": { - "required": false, "default": "inherit", "description": "Limit result set to posts assigned one or more statuses.", "type": "array", @@ -2106,10 +2651,13 @@ mockedApiResponse.Schema = { "trash" ], "type": "string" - } + }, + "required": false }, "media_type": { - "required": false, + "default": null, + "description": "Limit result set to attachments of a particular media type.", + "type": "string", "enum": [ "image", "video", @@ -2117,13 +2665,13 @@ mockedApiResponse.Schema = { "application", "audio" ], - "description": "Limit result set to attachments of a particular media type.", - "type": "string" + "required": false }, "mime_type": { - "required": false, + "default": null, "description": "Limit result set to attachments of a particular MIME type.", - "type": "string" + "type": "string", + "required": false } } }, @@ -2133,28 +2681,31 @@ mockedApiResponse.Schema = { ], "args": { "date": { - "required": false, "description": "The date the object was published, in the site's timezone.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "date_gmt": { - "required": false, "description": "The date the object was published, as GMT.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "slug": { - "required": false, "description": "An alphanumeric identifier for the object unique to its type.", - "type": "string" + "type": "string", + "required": false }, "status": { - "required": false, + "description": "A named status for the object.", + "type": "string", "enum": [ "publish", "future", @@ -2162,66 +2713,122 @@ mockedApiResponse.Schema = { "pending", "private" ], - "description": "A named status for the object.", - "type": "string" + "required": false }, "title": { - "required": false, "description": "The title for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Title for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML title for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "author": { - "required": false, "description": "The ID for the author of the object.", - "type": "integer" + "type": "integer", + "required": false }, "comment_status": { - "required": false, + "description": "Whether or not comments are open on the object.", + "type": "string", "enum": [ "open", "closed" ], - "description": "Whether or not comments are open on the object.", - "type": "string" + "required": false }, "ping_status": { - "required": false, + "description": "Whether or not the object can be pinged.", + "type": "string", "enum": [ "open", "closed" ], - "description": "Whether or not the object can be pinged.", - "type": "string" + "required": false }, "meta": { - "required": false, "description": "Meta fields.", - "type": "object" + "type": "object", + "properties": [], + "required": false }, "template": { - "required": false, "description": "The theme file to use to display the object.", - "type": "string" + "type": "string", + "required": false }, "alt_text": { - "required": false, "description": "Alternative text to display when attachment is not displayed.", - "type": "string" + "type": "string", + "required": false }, "caption": { - "required": false, "description": "The attachment caption.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Caption for the attachment, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML caption for the attachment, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "description": { - "required": false, "description": "The attachment description.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Description for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML description for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + } + }, + "required": false }, "post": { - "required": false, "description": "The ID for the associated post of the attachment.", - "type": "integer" + "type": "integer", + "required": false } } } @@ -2246,20 +2853,20 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the object.", - "type": "integer" + "type": "integer", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } }, @@ -2271,33 +2878,36 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the object.", - "type": "integer" + "type": "integer", + "required": false }, "date": { - "required": false, "description": "The date the object was published, in the site's timezone.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "date_gmt": { - "required": false, "description": "The date the object was published, as GMT.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "slug": { - "required": false, "description": "An alphanumeric identifier for the object unique to its type.", - "type": "string" + "type": "string", + "required": false }, "status": { - "required": false, + "description": "A named status for the object.", + "type": "string", "enum": [ "publish", "future", @@ -2305,66 +2915,122 @@ mockedApiResponse.Schema = { "pending", "private" ], - "description": "A named status for the object.", - "type": "string" + "required": false }, "title": { - "required": false, "description": "The title for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Title for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML title for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "author": { - "required": false, "description": "The ID for the author of the object.", - "type": "integer" + "type": "integer", + "required": false }, "comment_status": { - "required": false, + "description": "Whether or not comments are open on the object.", + "type": "string", "enum": [ "open", "closed" ], - "description": "Whether or not comments are open on the object.", - "type": "string" + "required": false }, "ping_status": { - "required": false, + "description": "Whether or not the object can be pinged.", + "type": "string", "enum": [ "open", "closed" ], - "description": "Whether or not the object can be pinged.", - "type": "string" + "required": false }, "meta": { - "required": false, "description": "Meta fields.", - "type": "object" + "type": "object", + "properties": [], + "required": false }, "template": { - "required": false, "description": "The theme file to use to display the object.", - "type": "string" + "type": "string", + "required": false }, "alt_text": { - "required": false, "description": "Alternative text to display when attachment is not displayed.", - "type": "string" + "type": "string", + "required": false }, "caption": { - "required": false, "description": "The attachment caption.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Caption for the attachment, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML caption for the attachment, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "description": { - "required": false, "description": "The attachment description.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Description for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML description for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + } + }, + "required": false }, "post": { - "required": false, "description": "The ID for the associated post of the attachment.", - "type": "integer" + "type": "integer", + "required": false } } }, @@ -2374,15 +3040,15 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the object.", - "type": "integer" + "type": "integer", + "required": false }, "force": { - "required": false, + "type": "boolean", "default": false, "description": "Whether to bypass Trash and force deletion.", - "type": "boolean" + "required": false } } } @@ -2400,16 +3066,16 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the object.", - "type": "integer" + "type": "integer", + "required": false }, "action": { - "required": true, + "type": "string", "enum": [ "create-image-subsizes" ], - "type": "string" + "required": true } } } @@ -2427,34 +3093,47 @@ mockedApiResponse.Schema = { ], "args": { "rotation": { - "required": false, "description": "The amount to rotate the image clockwise in degrees.", - "type": "integer" + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true, + "maximum": 360, + "exclusiveMaximum": true, + "required": false }, "x": { - "required": false, "description": "As a percentage of the image, the x position to start the crop from.", - "type": "number" + "type": "number", + "minimum": 0, + "maximum": 100, + "required": false }, "y": { - "required": false, "description": "As a percentage of the image, the y position to start the crop from.", - "type": "number" + "type": "number", + "minimum": 0, + "maximum": 100, + "required": false }, "width": { - "required": false, "description": "As a percentage of the image, the width to crop the image to.", - "type": "number" + "type": "number", + "minimum": 0, + "maximum": 100, + "required": false }, "height": { - "required": false, "description": "As a percentage of the image, the height to crop the image to.", - "type": "number" + "type": "number", + "minimum": 0, + "maximum": 100, + "required": false }, "src": { - "required": true, "description": "URL to the edited image file.", - "type": "string" + "type": "string", + "format": "uri", + "required": true } } } @@ -2473,78 +3152,84 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "page": { - "required": false, - "default": 1, "description": "Current page of the collection.", - "type": "integer" + "type": "integer", + "default": 1, + "minimum": 1, + "required": false }, "per_page": { - "required": false, - "default": 10, "description": "Maximum number of items to be returned in result set.", - "type": "integer" + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false }, "search": { - "required": false, "description": "Limit results to those matching a string.", - "type": "string" + "type": "string", + "required": false }, "after": { - "required": false, "description": "Limit response to posts published after a given ISO8601 compliant date.", - "type": "string" + "type": "string", + "format": "date-time", + "required": false }, "before": { - "required": false, "description": "Limit response to posts published before a given ISO8601 compliant date.", - "type": "string" + "type": "string", + "format": "date-time", + "required": false }, "exclude": { - "required": false, - "default": [], "description": "Ensure result set excludes specific IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "include": { - "required": false, - "default": [], "description": "Limit result set to specific IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "offset": { - "required": false, "description": "Offset the result set by a specific number of items.", - "type": "integer" + "type": "integer", + "required": false }, "order": { - "required": false, + "description": "Order sort attribute ascending or descending.", + "type": "string", "default": "desc", "enum": [ "asc", "desc" ], - "description": "Order sort attribute ascending or descending.", - "type": "string" + "required": false }, "orderby": { - "required": false, + "description": "Sort collection by object attribute.", + "type": "string", "default": "date", "enum": [ "author", @@ -2558,19 +3243,17 @@ mockedApiResponse.Schema = { "include_slugs", "title" ], - "description": "Sort collection by object attribute.", - "type": "string" + "required": false }, "slug": { - "required": false, "description": "Limit result set to posts with one or more specific slugs.", "type": "array", "items": { "type": "string" - } + }, + "required": false }, "status": { - "required": false, "default": "publish", "description": "Limit result set to posts assigned one or more statuses.", "type": "array", @@ -2591,7 +3274,8 @@ mockedApiResponse.Schema = { "any" ], "type": "string" - } + }, + "required": false } } }, @@ -2601,28 +3285,31 @@ mockedApiResponse.Schema = { ], "args": { "date": { - "required": false, "description": "The date the object was published, in the site's timezone.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "date_gmt": { - "required": false, "description": "The date the object was published, as GMT.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "slug": { - "required": false, "description": "An alphanumeric identifier for the object unique to its type.", - "type": "string" + "type": "string", + "required": false }, "status": { - "required": false, + "description": "A named status for the object.", + "type": "string", "enum": [ "publish", "future", @@ -2630,28 +3317,65 @@ mockedApiResponse.Schema = { "pending", "private" ], - "description": "A named status for the object.", - "type": "string" + "required": false }, "password": { - "required": false, "description": "A password to protect access to the content and excerpt.", - "type": "string" + "type": "string", + "required": false }, "title": { - "required": false, "description": "The title for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Title for the object, as it exists in the database.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false }, "content": { - "required": false, "description": "The content for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Content for the object, as it exists in the database.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "block_version": { + "description": "Version of the content block format used by the object.", + "type": "integer", + "context": [ + "edit" + ], + "readonly": true + }, + "protected": { + "description": "Whether the content is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "template": { - "required": false, "description": "The theme file to use to display the object.", - "type": "string" + "type": "string", + "required": false } } } @@ -2676,25 +3400,25 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the object.", - "type": "integer" + "type": "integer", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "password": { - "required": false, "description": "The password for the post if it is password protected.", - "type": "string" + "type": "string", + "required": false } } }, @@ -2706,33 +3430,36 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the object.", - "type": "integer" + "type": "integer", + "required": false }, "date": { - "required": false, "description": "The date the object was published, in the site's timezone.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "date_gmt": { - "required": false, "description": "The date the object was published, as GMT.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "slug": { - "required": false, "description": "An alphanumeric identifier for the object unique to its type.", - "type": "string" + "type": "string", + "required": false }, "status": { - "required": false, + "description": "A named status for the object.", + "type": "string", "enum": [ "publish", "future", @@ -2740,28 +3467,65 @@ mockedApiResponse.Schema = { "pending", "private" ], - "description": "A named status for the object.", - "type": "string" + "required": false }, "password": { - "required": false, "description": "A password to protect access to the content and excerpt.", - "type": "string" + "type": "string", + "required": false }, "title": { - "required": false, "description": "The title for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Title for the object, as it exists in the database.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false }, "content": { - "required": false, "description": "The content for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Content for the object, as it exists in the database.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "block_version": { + "description": "Version of the content block format used by the object.", + "type": "integer", + "context": [ + "edit" + ], + "readonly": true + }, + "protected": { + "description": "Whether the content is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "template": { - "required": false, "description": "The theme file to use to display the object.", - "type": "string" + "type": "string", + "required": false } } }, @@ -2771,15 +3535,15 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the object.", - "type": "integer" + "type": "integer", + "required": false }, "force": { - "required": false, + "type": "boolean", "default": false, "description": "Whether to bypass Trash and force deletion.", - "type": "boolean" + "required": false } } } @@ -2798,20 +3562,20 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "required": false, "description": "The ID for the parent of the object.", - "type": "integer" + "type": "integer", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } }, @@ -2821,33 +3585,36 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "required": false, "description": "The ID for the parent of the object.", - "type": "integer" + "type": "integer", + "required": false }, "date": { - "required": false, "description": "The date the object was published, in the site's timezone.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "date_gmt": { - "required": false, "description": "The date the object was published, as GMT.", "type": [ "string", "null" - ] + ], + "format": "date-time", + "required": false }, "slug": { - "required": false, "description": "An alphanumeric identifier for the object unique to its type.", - "type": "string" + "type": "string", + "required": false }, "status": { - "required": false, + "description": "A named status for the object.", + "type": "string", "enum": [ "publish", "future", @@ -2855,28 +3622,65 @@ mockedApiResponse.Schema = { "pending", "private" ], - "description": "A named status for the object.", - "type": "string" + "required": false }, "password": { - "required": false, "description": "A password to protect access to the content and excerpt.", - "type": "string" + "type": "string", + "required": false }, "title": { - "required": false, "description": "The title for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Title for the object, as it exists in the database.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false }, "content": { - "required": false, "description": "The content for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Content for the object, as it exists in the database.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "block_version": { + "description": "Version of the content block format used by the object.", + "type": "integer", + "context": [ + "edit" + ], + "readonly": true + }, + "protected": { + "description": "Whether the content is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "template": { - "required": false, "description": "The theme file to use to display the object.", - "type": "string" + "type": "string", + "required": false } } } @@ -2894,25 +3698,25 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "required": false, "description": "The ID for the parent of the object.", - "type": "integer" + "type": "integer", + "required": false }, "id": { - "required": false, "description": "The ID for the object.", - "type": "integer" + "type": "integer", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } } @@ -2930,15 +3734,15 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } } @@ -2959,20 +3763,20 @@ mockedApiResponse.Schema = { ], "args": { "type": { - "required": false, "description": "An alphanumeric identifier for the post type.", - "type": "string" + "type": "string", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } } @@ -2990,15 +3794,15 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } } @@ -3019,20 +3823,20 @@ mockedApiResponse.Schema = { ], "args": { "status": { - "required": false, "description": "An alphanumeric identifier for the status.", - "type": "string" + "type": "string", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } } @@ -3050,20 +3854,20 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "type": { - "required": false, "description": "Limit results to taxonomies associated with a specific post type.", - "type": "string" + "type": "string", + "required": false } } } @@ -3084,20 +3888,20 @@ mockedApiResponse.Schema = { ], "args": { "taxonomy": { - "required": false, "description": "An alphanumeric identifier for the taxonomy.", - "type": "string" + "type": "string", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } } @@ -3116,63 +3920,67 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "page": { - "required": false, - "default": 1, "description": "Current page of the collection.", - "type": "integer" + "type": "integer", + "default": 1, + "minimum": 1, + "required": false }, "per_page": { - "required": false, - "default": 10, "description": "Maximum number of items to be returned in result set.", - "type": "integer" + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false }, "search": { - "required": false, "description": "Limit results to those matching a string.", - "type": "string" + "type": "string", + "required": false }, "exclude": { - "required": false, - "default": [], "description": "Ensure result set excludes specific IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "include": { - "required": false, - "default": [], "description": "Limit result set to specific IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "order": { - "required": false, + "description": "Order sort attribute ascending or descending.", + "type": "string", "default": "asc", "enum": [ "asc", "desc" ], - "description": "Order sort attribute ascending or descending.", - "type": "string" + "required": false }, "orderby": { - "required": false, + "description": "Sort collection by term attribute.", + "type": "string", "default": "name", "enum": [ "id", @@ -3184,32 +3992,32 @@ mockedApiResponse.Schema = { "description", "count" ], - "description": "Sort collection by term attribute.", - "type": "string" + "required": false }, "hide_empty": { - "required": false, - "default": false, "description": "Whether to hide terms not assigned to any posts.", - "type": "boolean" + "type": "boolean", + "default": false, + "required": false }, "parent": { - "required": false, "description": "Limit result set to terms assigned to a specific parent.", - "type": "integer" + "type": "integer", + "required": false }, "post": { - "required": false, "description": "Limit result set to terms assigned to a specific post.", - "type": "integer" + "type": "integer", + "default": null, + "required": false }, "slug": { - "required": false, "description": "Limit result set to terms with one or more specific slugs.", "type": "array", "items": { "type": "string" - } + }, + "required": false } } }, @@ -3219,29 +4027,30 @@ mockedApiResponse.Schema = { ], "args": { "description": { - "required": false, "description": "HTML description of the term.", - "type": "string" + "type": "string", + "required": false }, "name": { - "required": true, "description": "HTML title for the term.", - "type": "string" + "type": "string", + "required": true }, "slug": { - "required": false, "description": "An alphanumeric identifier for the term unique to its type.", - "type": "string" + "type": "string", + "required": false }, "parent": { - "required": false, "description": "The parent term ID.", - "type": "integer" + "type": "integer", + "required": false }, "meta": { - "required": false, "description": "Meta fields.", - "type": "object" + "type": "object", + "properties": [], + "required": false } } } @@ -3266,20 +4075,20 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the term.", - "type": "integer" + "type": "integer", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } }, @@ -3291,34 +4100,35 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the term.", - "type": "integer" + "type": "integer", + "required": false }, "description": { - "required": false, "description": "HTML description of the term.", - "type": "string" + "type": "string", + "required": false }, "name": { - "required": false, "description": "HTML title for the term.", - "type": "string" + "type": "string", + "required": false }, "slug": { - "required": false, "description": "An alphanumeric identifier for the term unique to its type.", - "type": "string" + "type": "string", + "required": false }, "parent": { - "required": false, "description": "The parent term ID.", - "type": "integer" + "type": "integer", + "required": false }, "meta": { - "required": false, "description": "Meta fields.", - "type": "object" + "type": "object", + "properties": [], + "required": false } } }, @@ -3328,15 +4138,15 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the term.", - "type": "integer" + "type": "integer", + "required": false }, "force": { - "required": false, + "type": "boolean", "default": false, "description": "Required to be true, as terms do not support trashing.", - "type": "boolean" + "required": false } } } @@ -3355,68 +4165,72 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "page": { - "required": false, - "default": 1, "description": "Current page of the collection.", - "type": "integer" + "type": "integer", + "default": 1, + "minimum": 1, + "required": false }, "per_page": { - "required": false, - "default": 10, "description": "Maximum number of items to be returned in result set.", - "type": "integer" + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false }, "search": { - "required": false, "description": "Limit results to those matching a string.", - "type": "string" + "type": "string", + "required": false }, "exclude": { - "required": false, - "default": [], "description": "Ensure result set excludes specific IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "include": { - "required": false, - "default": [], "description": "Limit result set to specific IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "offset": { - "required": false, "description": "Offset the result set by a specific number of items.", - "type": "integer" + "type": "integer", + "required": false }, "order": { - "required": false, + "description": "Order sort attribute ascending or descending.", + "type": "string", "default": "asc", "enum": [ "asc", "desc" ], - "description": "Order sort attribute ascending or descending.", - "type": "string" + "required": false }, "orderby": { - "required": false, + "description": "Sort collection by term attribute.", + "type": "string", "default": "name", "enum": [ "id", @@ -3428,27 +4242,27 @@ mockedApiResponse.Schema = { "description", "count" ], - "description": "Sort collection by term attribute.", - "type": "string" + "required": false }, "hide_empty": { - "required": false, - "default": false, "description": "Whether to hide terms not assigned to any posts.", - "type": "boolean" + "type": "boolean", + "default": false, + "required": false }, "post": { - "required": false, "description": "Limit result set to terms assigned to a specific post.", - "type": "integer" + "type": "integer", + "default": null, + "required": false }, "slug": { - "required": false, "description": "Limit result set to terms with one or more specific slugs.", "type": "array", "items": { "type": "string" - } + }, + "required": false } } }, @@ -3458,24 +4272,25 @@ mockedApiResponse.Schema = { ], "args": { "description": { - "required": false, "description": "HTML description of the term.", - "type": "string" + "type": "string", + "required": false }, "name": { - "required": true, "description": "HTML title for the term.", - "type": "string" + "type": "string", + "required": true }, "slug": { - "required": false, "description": "An alphanumeric identifier for the term unique to its type.", - "type": "string" + "type": "string", + "required": false }, "meta": { - "required": false, "description": "Meta fields.", - "type": "object" + "type": "object", + "properties": [], + "required": false } } } @@ -3500,20 +4315,20 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the term.", - "type": "integer" + "type": "integer", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } }, @@ -3525,29 +4340,30 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the term.", - "type": "integer" + "type": "integer", + "required": false }, "description": { - "required": false, "description": "HTML description of the term.", - "type": "string" + "type": "string", + "required": false }, "name": { - "required": false, "description": "HTML title for the term.", - "type": "string" + "type": "string", + "required": false }, "slug": { - "required": false, "description": "An alphanumeric identifier for the term unique to its type.", - "type": "string" + "type": "string", + "required": false }, "meta": { - "required": false, "description": "Meta fields.", - "type": "object" + "type": "object", + "properties": [], + "required": false } } }, @@ -3557,15 +4373,15 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the term.", - "type": "integer" + "type": "integer", + "required": false }, "force": { - "required": false, + "type": "boolean", "default": false, "description": "Required to be true, as terms do not support trashing.", - "type": "boolean" + "required": false } } } @@ -3584,69 +4400,72 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "page": { - "required": false, - "default": 1, "description": "Current page of the collection.", - "type": "integer" + "type": "integer", + "default": 1, + "minimum": 1, + "required": false }, "per_page": { - "required": false, - "default": 10, "description": "Maximum number of items to be returned in result set.", - "type": "integer" + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false }, "search": { - "required": false, "description": "Limit results to those matching a string.", - "type": "string" + "type": "string", + "required": false }, "exclude": { - "required": false, - "default": [], "description": "Ensure result set excludes specific IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "include": { - "required": false, - "default": [], "description": "Limit result set to specific IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "offset": { - "required": false, "description": "Offset the result set by a specific number of items.", - "type": "integer" + "type": "integer", + "required": false }, "order": { - "required": false, "default": "asc", + "description": "Order sort attribute ascending or descending.", "enum": [ "asc", "desc" ], - "description": "Order sort attribute ascending or descending.", - "type": "string" + "type": "string", + "required": false }, "orderby": { - "required": false, "default": "name", + "description": "Sort collection by object attribute.", "enum": [ "id", "include", @@ -3657,32 +4476,32 @@ mockedApiResponse.Schema = { "email", "url" ], - "description": "Sort collection by object attribute.", - "type": "string" + "type": "string", + "required": false }, "slug": { - "required": false, "description": "Limit result set to users with one or more specific slugs.", "type": "array", "items": { "type": "string" - } + }, + "required": false }, "roles": { - "required": false, "description": "Limit result set to users matching at least one specific role provided. Accepts csv list or single role.", "type": "array", "items": { "type": "string" - } + }, + "required": false }, "who": { - "required": false, + "description": "Limit result set to users who are considered authors.", + "type": "string", "enum": [ "authors" ], - "description": "Limit result set to users who are considered authors.", - "type": "string" + "required": false } } }, @@ -3692,42 +4511,45 @@ mockedApiResponse.Schema = { ], "args": { "username": { - "required": true, "description": "Login name for the user.", - "type": "string" + "type": "string", + "required": true }, "name": { - "required": false, "description": "Display name for the user.", - "type": "string" + "type": "string", + "required": false }, "first_name": { - "required": false, "description": "First name for the user.", - "type": "string" + "type": "string", + "required": false }, "last_name": { - "required": false, "description": "Last name for the user.", - "type": "string" + "type": "string", + "required": false }, "email": { - "required": true, "description": "The email address for the user.", - "type": "string" + "type": "string", + "format": "email", + "required": true }, "url": { - "required": false, "description": "URL of the user.", - "type": "string" + "type": "string", + "format": "uri", + "required": false }, "description": { - "required": false, "description": "Description of the user.", - "type": "string" + "type": "string", + "required": false }, "locale": { - "required": false, + "description": "Locale for the user.", + "type": "string", "enum": [ "", "en_US", @@ -3736,36 +4558,36 @@ mockedApiResponse.Schema = { "es_ES", "ja_JP" ], - "description": "Locale for the user.", - "type": "string" + "required": false }, "nickname": { - "required": false, "description": "The nickname for the user.", - "type": "string" + "type": "string", + "required": false }, "slug": { - "required": false, "description": "An alphanumeric identifier for the user.", - "type": "string" + "type": "string", + "required": false }, "roles": { - "required": false, "description": "Roles assigned to the user.", "type": "array", "items": { "type": "string" - } + }, + "required": false }, "password": { - "required": true, "description": "Password for the user (never included).", - "type": "string" + "type": "string", + "required": true }, "meta": { - "required": false, "description": "Meta fields.", - "type": "object" + "type": "object", + "properties": [], + "required": false } } } @@ -3790,20 +4612,20 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the user.", - "type": "integer" + "type": "integer", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } }, @@ -3815,47 +4637,50 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the user.", - "type": "integer" + "type": "integer", + "required": false }, "username": { - "required": false, "description": "Login name for the user.", - "type": "string" + "type": "string", + "required": false }, "name": { - "required": false, "description": "Display name for the user.", - "type": "string" + "type": "string", + "required": false }, "first_name": { - "required": false, "description": "First name for the user.", - "type": "string" + "type": "string", + "required": false }, "last_name": { - "required": false, "description": "Last name for the user.", - "type": "string" + "type": "string", + "required": false }, "email": { - "required": false, "description": "The email address for the user.", - "type": "string" + "type": "string", + "format": "email", + "required": false }, "url": { - "required": false, "description": "URL of the user.", - "type": "string" + "type": "string", + "format": "uri", + "required": false }, "description": { - "required": false, "description": "Description of the user.", - "type": "string" + "type": "string", + "required": false }, "locale": { - "required": false, + "description": "Locale for the user.", + "type": "string", "enum": [ "", "en_US", @@ -3864,36 +4689,36 @@ mockedApiResponse.Schema = { "es_ES", "ja_JP" ], - "description": "Locale for the user.", - "type": "string" + "required": false }, "nickname": { - "required": false, "description": "The nickname for the user.", - "type": "string" + "type": "string", + "required": false }, "slug": { - "required": false, "description": "An alphanumeric identifier for the user.", - "type": "string" + "type": "string", + "required": false }, "roles": { - "required": false, "description": "Roles assigned to the user.", "type": "array", "items": { "type": "string" - } + }, + "required": false }, "password": { - "required": false, "description": "Password for the user (never included).", - "type": "string" + "type": "string", + "required": false }, "meta": { - "required": false, "description": "Meta fields.", - "type": "object" + "type": "object", + "properties": [], + "required": false } } }, @@ -3903,20 +4728,20 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the user.", - "type": "integer" + "type": "integer", + "required": false }, "force": { - "required": false, + "type": "boolean", "default": false, "description": "Required to be true, as users do not support trashing.", - "type": "boolean" + "required": false }, "reassign": { - "required": true, + "type": "integer", "description": "Reassign the deleted user's posts and links to this user ID.", - "type": "integer" + "required": true } } } @@ -3938,15 +4763,15 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } }, @@ -3958,42 +4783,45 @@ mockedApiResponse.Schema = { ], "args": { "username": { - "required": false, "description": "Login name for the user.", - "type": "string" + "type": "string", + "required": false }, "name": { - "required": false, "description": "Display name for the user.", - "type": "string" + "type": "string", + "required": false }, "first_name": { - "required": false, "description": "First name for the user.", - "type": "string" + "type": "string", + "required": false }, "last_name": { - "required": false, "description": "Last name for the user.", - "type": "string" + "type": "string", + "required": false }, "email": { - "required": false, "description": "The email address for the user.", - "type": "string" + "type": "string", + "format": "email", + "required": false }, "url": { - "required": false, "description": "URL of the user.", - "type": "string" + "type": "string", + "format": "uri", + "required": false }, "description": { - "required": false, "description": "Description of the user.", - "type": "string" + "type": "string", + "required": false }, "locale": { - "required": false, + "description": "Locale for the user.", + "type": "string", "enum": [ "", "en_US", @@ -4002,36 +4830,36 @@ mockedApiResponse.Schema = { "es_ES", "ja_JP" ], - "description": "Locale for the user.", - "type": "string" + "required": false }, "nickname": { - "required": false, "description": "The nickname for the user.", - "type": "string" + "type": "string", + "required": false }, "slug": { - "required": false, "description": "An alphanumeric identifier for the user.", - "type": "string" + "type": "string", + "required": false }, "roles": { - "required": false, "description": "Roles assigned to the user.", "type": "array", "items": { "type": "string" - } + }, + "required": false }, "password": { - "required": false, "description": "Password for the user (never included).", - "type": "string" + "type": "string", + "required": false }, "meta": { - "required": false, "description": "Meta fields.", - "type": "object" + "type": "object", + "properties": [], + "required": false } } }, @@ -4041,15 +4869,15 @@ mockedApiResponse.Schema = { ], "args": { "force": { - "required": false, + "type": "boolean", "default": false, "description": "Required to be true, as users do not support trashing.", - "type": "boolean" + "required": false }, "reassign": { - "required": true, + "type": "integer", "description": "Reassign the deleted user's posts and links to this user ID.", - "type": "integer" + "required": true } } } @@ -4072,15 +4900,15 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } }, @@ -4090,9 +4918,9 @@ mockedApiResponse.Schema = { ], "args": { "name": { - "required": true, "description": "The name of the application password.", - "type": "string" + "type": "string", + "required": true } } }, @@ -4120,15 +4948,15 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } }, @@ -4140,9 +4968,9 @@ mockedApiResponse.Schema = { ], "args": { "name": { - "required": false, "description": "The name of the application password.", - "type": "string" + "type": "string", + "required": false } } }, @@ -4167,99 +4995,107 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "page": { - "required": false, - "default": 1, "description": "Current page of the collection.", - "type": "integer" + "type": "integer", + "default": 1, + "minimum": 1, + "required": false }, "per_page": { - "required": false, - "default": 10, "description": "Maximum number of items to be returned in result set.", - "type": "integer" + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false }, "search": { - "required": false, "description": "Limit results to those matching a string.", - "type": "string" + "type": "string", + "required": false }, "after": { - "required": false, "description": "Limit response to comments published after a given ISO8601 compliant date.", - "type": "string" + "type": "string", + "format": "date-time", + "required": false }, "author": { - "required": false, "description": "Limit result set to comments assigned to specific user IDs. Requires authorization.", "type": "array", "items": { "type": "integer" - } + }, + "required": false }, "author_exclude": { - "required": false, "description": "Ensure result set excludes comments assigned to specific user IDs. Requires authorization.", "type": "array", "items": { "type": "integer" - } + }, + "required": false }, "author_email": { - "required": false, + "default": null, "description": "Limit result set to that from a specific author email. Requires authorization.", - "type": "string" + "format": "email", + "type": "string", + "required": false }, "before": { - "required": false, "description": "Limit response to comments published before a given ISO8601 compliant date.", - "type": "string" + "type": "string", + "format": "date-time", + "required": false }, "exclude": { - "required": false, - "default": [], "description": "Ensure result set excludes specific IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "include": { - "required": false, - "default": [], "description": "Limit result set to specific IDs.", "type": "array", "items": { "type": "integer" - } + }, + "default": [], + "required": false }, "offset": { - "required": false, "description": "Offset the result set by a specific number of items.", - "type": "integer" + "type": "integer", + "required": false }, "order": { - "required": false, + "description": "Order sort attribute ascending or descending.", + "type": "string", "default": "desc", "enum": [ "asc", "desc" ], - "description": "Order sort attribute ascending or descending.", - "type": "string" + "required": false }, "orderby": { - "required": false, + "description": "Sort collection by object attribute.", + "type": "string", "default": "date_gmt", "enum": [ "date", @@ -4270,52 +5106,51 @@ mockedApiResponse.Schema = { "parent", "type" ], - "description": "Sort collection by object attribute.", - "type": "string" + "required": false }, "parent": { - "required": false, "default": [], "description": "Limit result set to comments of specific parent IDs.", "type": "array", "items": { "type": "integer" - } + }, + "required": false }, "parent_exclude": { - "required": false, "default": [], "description": "Ensure result set excludes specific parent IDs.", "type": "array", "items": { "type": "integer" - } + }, + "required": false }, "post": { - "required": false, "default": [], "description": "Limit result set to comments assigned to specific post IDs.", "type": "array", "items": { "type": "integer" - } + }, + "required": false }, "status": { - "required": false, "default": "approve", "description": "Limit result set to comments assigned a specific status. Requires authorization.", - "type": "string" + "type": "string", + "required": false }, "type": { - "required": false, "default": "comment", "description": "Limit result set to comments assigned a specific type. Requires authorization.", - "type": "string" + "type": "string", + "required": false }, "password": { - "required": false, "description": "The password for the post if it is password protected.", - "type": "string" + "type": "string", + "required": false } } }, @@ -4325,71 +5160,96 @@ mockedApiResponse.Schema = { ], "args": { "author": { - "required": false, "description": "The ID of the user object, if author was a user.", - "type": "integer" + "type": "integer", + "required": false }, "author_email": { - "required": false, "description": "Email address for the object author.", - "type": "string" + "type": "string", + "format": "email", + "required": false }, "author_ip": { - "required": false, "description": "IP address for the object author.", - "type": "string" + "type": "string", + "format": "ip", + "required": false }, "author_name": { - "required": false, "description": "Display name for the object author.", - "type": "string" + "type": "string", + "required": false }, "author_url": { - "required": false, "description": "URL for the object author.", - "type": "string" + "type": "string", + "format": "uri", + "required": false }, "author_user_agent": { - "required": false, "description": "User agent for the object author.", - "type": "string" + "type": "string", + "required": false }, "content": { - "required": false, "description": "The content for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Content for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML content for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "date": { - "required": false, "description": "The date the object was published, in the site's timezone.", - "type": "string" + "type": "string", + "format": "date-time", + "required": false }, "date_gmt": { - "required": false, "description": "The date the object was published, as GMT.", - "type": "string" + "type": "string", + "format": "date-time", + "required": false }, "parent": { - "required": false, "default": 0, "description": "The ID for the parent of the object.", - "type": "integer" + "type": "integer", + "required": false }, "post": { - "required": false, "default": 0, "description": "The ID of the associated post object.", - "type": "integer" + "type": "integer", + "required": false }, "status": { - "required": false, "description": "State of the object.", - "type": "string" + "type": "string", + "required": false }, "meta": { - "required": false, "description": "Meta fields.", - "type": "object" + "type": "object", + "properties": [], + "required": false } } } @@ -4414,25 +5274,25 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the object.", - "type": "integer" + "type": "integer", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "password": { - "required": false, "description": "The password for the parent post of the comment (if the post is password protected).", - "type": "string" + "type": "string", + "required": false } } }, @@ -4444,74 +5304,99 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the object.", - "type": "integer" + "type": "integer", + "required": false }, "author": { - "required": false, "description": "The ID of the user object, if author was a user.", - "type": "integer" + "type": "integer", + "required": false }, "author_email": { - "required": false, "description": "Email address for the object author.", - "type": "string" + "type": "string", + "format": "email", + "required": false }, "author_ip": { - "required": false, "description": "IP address for the object author.", - "type": "string" + "type": "string", + "format": "ip", + "required": false }, "author_name": { - "required": false, "description": "Display name for the object author.", - "type": "string" + "type": "string", + "required": false }, "author_url": { - "required": false, "description": "URL for the object author.", - "type": "string" + "type": "string", + "format": "uri", + "required": false }, "author_user_agent": { - "required": false, "description": "User agent for the object author.", - "type": "string" + "type": "string", + "required": false }, "content": { - "required": false, "description": "The content for the object.", - "type": "object" + "type": "object", + "properties": { + "raw": { + "description": "Content for the object, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML content for the object, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false }, "date": { - "required": false, "description": "The date the object was published, in the site's timezone.", - "type": "string" + "type": "string", + "format": "date-time", + "required": false }, "date_gmt": { - "required": false, "description": "The date the object was published, as GMT.", - "type": "string" + "type": "string", + "format": "date-time", + "required": false }, "parent": { - "required": false, "description": "The ID for the parent of the object.", - "type": "integer" + "type": "integer", + "required": false }, "post": { - "required": false, "description": "The ID of the associated post object.", - "type": "integer" + "type": "integer", + "required": false }, "status": { - "required": false, "description": "State of the object.", - "type": "string" + "type": "string", + "required": false }, "meta": { - "required": false, "description": "Meta fields.", - "type": "object" + "type": "object", + "properties": [], + "required": false } } }, @@ -4521,20 +5406,20 @@ mockedApiResponse.Schema = { ], "args": { "id": { - "required": false, "description": "Unique identifier for the object.", - "type": "integer" + "type": "integer", + "required": false }, "force": { - "required": false, + "type": "boolean", "default": false, "description": "Whether to bypass Trash and force deletion.", - "type": "boolean" + "required": false }, "password": { - "required": false, "description": "The password for the parent post of the comment (if the post is password protected).", - "type": "string" + "type": "string", + "required": false } } } @@ -4552,45 +5437,47 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "page": { - "required": false, - "default": 1, "description": "Current page of the collection.", - "type": "integer" + "type": "integer", + "default": 1, + "minimum": 1, + "required": false }, "per_page": { - "required": false, - "default": 10, "description": "Maximum number of items to be returned in result set.", - "type": "integer" + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false }, "search": { - "required": false, "description": "Limit results to those matching a string.", - "type": "string" + "type": "string", + "required": false }, "type": { - "required": false, "default": "post", + "description": "Limit results to items of an object type.", + "type": "string", "enum": [ "post", "term", "post-format" ], - "description": "Limit results to items of an object type.", - "type": "string" + "required": false }, "subtype": { - "required": false, "default": "any", "description": "Limit results to items of one or more object subtypes.", "type": "array", @@ -4603,7 +5490,8 @@ mockedApiResponse.Schema = { "any" ], "type": "string" - } + }, + "required": false } } } @@ -4626,29 +5514,29 @@ mockedApiResponse.Schema = { ], "args": { "name": { - "required": false, "description": "Unique registered name for the block.", - "type": "string" + "type": "string", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "attributes": { - "required": false, - "default": [], "description": "Attributes for the block.", - "type": "object" + "type": "object", + "default": [], + "required": false }, "post_id": { - "required": false, "description": "ID of the post context.", - "type": "integer" + "type": "integer", + "required": false } } } @@ -4666,20 +5554,20 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "namespace": { - "required": false, "description": "Block namespace.", - "type": "string" + "type": "string", + "required": false } } } @@ -4704,20 +5592,20 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "namespace": { - "required": false, "description": "Block namespace.", - "type": "string" + "type": "string", + "required": false } } } @@ -4735,25 +5623,25 @@ mockedApiResponse.Schema = { ], "args": { "name": { - "required": false, "description": "Block name.", - "type": "string" + "type": "string", + "required": false }, "namespace": { - "required": false, "description": "Block namespace.", - "type": "string" + "type": "string", + "required": false }, "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false } } } @@ -4782,87 +5670,89 @@ mockedApiResponse.Schema = { ], "args": { "title": { - "required": false, "description": "Site title.", - "type": "string" + "type": "string", + "required": false }, "description": { - "required": false, "description": "Site tagline.", - "type": "string" + "type": "string", + "required": false }, "url": { - "required": false, "description": "Site URL.", - "type": "string" + "type": "string", + "format": "uri", + "required": false }, "email": { - "required": false, "description": "This address is used for admin purposes, like new user notification.", - "type": "string" + "type": "string", + "format": "email", + "required": false }, "timezone": { - "required": false, "description": "A city in the same timezone as you.", - "type": "string" + "type": "string", + "required": false }, "date_format": { - "required": false, "description": "A date format for all date strings.", - "type": "string" + "type": "string", + "required": false }, "time_format": { - "required": false, "description": "A time format for all time strings.", - "type": "string" + "type": "string", + "required": false }, "start_of_week": { - "required": false, "description": "A day number of the week that the week should start on.", - "type": "integer" + "type": "integer", + "required": false }, "language": { - "required": false, "description": "WordPress locale code.", - "type": "string" + "type": "string", + "required": false }, "use_smilies": { - "required": false, "description": "Convert emoticons like :-) and :-P to graphics on display.", - "type": "boolean" + "type": "boolean", + "required": false }, "default_category": { - "required": false, "description": "Default post category.", - "type": "integer" + "type": "integer", + "required": false }, "default_post_format": { - "required": false, "description": "Default post format.", - "type": "string" + "type": "string", + "required": false }, "posts_per_page": { - "required": false, "description": "Blog pages show at most.", - "type": "integer" + "type": "integer", + "required": false }, "default_ping_status": { - "required": false, + "description": "Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.", + "type": "string", "enum": [ "open", "closed" ], - "description": "Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.", - "type": "string" + "required": false }, "default_comment_status": { - "required": false, + "description": "Allow people to submit comments on new posts.", + "type": "string", "enum": [ "open", "closed" ], - "description": "Allow people to submit comments on new posts.", - "type": "string" + "required": false } } } @@ -4883,29 +5773,31 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "type": "string", + "required": false }, "page": { - "required": false, - "default": 1, "description": "Current page of the collection.", - "type": "integer" + "type": "integer", + "default": 1, + "minimum": 1, + "required": false }, "per_page": { - "required": false, - "default": 10, "description": "Maximum number of items to be returned in result set.", - "type": "integer" + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false }, "search": { - "required": false, "description": "Limit results to those matching a string.", - "type": "string" + "type": "string", + "required": false }, "status": { - "required": true, "description": "Limit result set to themes assigned one or more statuses.", "type": "array", "items": { @@ -4913,7 +5805,8 @@ mockedApiResponse.Schema = { "active" ], "type": "string" - } + }, + "required": true } } } @@ -4935,23 +5828,22 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "search": { - "required": false, "description": "Limit results to those matching a string.", - "type": "string" + "type": "string", + "required": false }, "status": { - "required": false, "description": "Limits results to plugins with the given status.", "type": "array", "items": { @@ -4960,7 +5852,8 @@ mockedApiResponse.Schema = { "inactive", "active" ] - } + }, + "required": false } } }, @@ -4970,19 +5863,20 @@ mockedApiResponse.Schema = { ], "args": { "slug": { - "required": true, + "type": "string", "description": "WordPress.org plugin directory slug.", - "type": "string" + "pattern": "[\\w\\-]+", + "required": true }, "status": { - "required": false, - "default": "inactive", + "description": "The plugin activation status.", + "type": "string", "enum": [ "inactive", "active" ], - "description": "The plugin activation status.", - "type": "string" + "default": "inactive", + "required": false } } } @@ -5011,19 +5905,20 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "plugin": { - "required": false, - "type": "string" + "type": "string", + "pattern": "[^.\\/]+(?:\\/[^.\\/]+)?", + "required": false } } }, @@ -5035,28 +5930,29 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "plugin": { - "required": false, - "type": "string" + "type": "string", + "pattern": "[^.\\/]+(?:\\/[^.\\/]+)?", + "required": false }, "status": { - "required": false, + "description": "The plugin activation status.", + "type": "string", "enum": [ "inactive", "active" ], - "description": "The plugin activation status.", - "type": "string" + "required": false } } }, @@ -5066,19 +5962,20 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view", "embed", "edit" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "plugin": { - "required": false, - "type": "string" + "type": "string", + "pattern": "[^.\\/]+(?:\\/[^.\\/]+)?", + "required": false } } } @@ -5096,30 +5993,34 @@ mockedApiResponse.Schema = { ], "args": { "context": { - "required": false, - "default": "view", + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", "enum": [ "view" ], - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string" + "default": "view", + "required": false }, "page": { - "required": false, - "default": 1, "description": "Current page of the collection.", - "type": "integer" + "type": "integer", + "default": 1, + "minimum": 1, + "required": false }, "per_page": { - "required": false, - "default": 10, "description": "Maximum number of items to be returned in result set.", - "type": "integer" + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false }, "term": { - "required": true, "description": "Limit result set to blocks matching the search term.", - "type": "string" + "type": "string", + "minLength": 1, + "required": true } } } @@ -5144,12 +6045,12 @@ mockedApiResponse.Schema = { ], "args": { "namespace": { - "required": false, - "default": "wp-site-health/v1" + "default": "wp-site-health/v1", + "required": false }, "context": { - "required": false, - "default": "view" + "default": "view", + "required": false } } } @@ -5264,12 +6165,12 @@ mockedApiResponse.oembed = { ], "args": { "namespace": { - "required": false, - "default": "oembed/1.0" + "default": "oembed/1.0", + "required": false }, "context": { - "required": false, - "default": "view" + "default": "view", + "required": false } } } @@ -5290,17 +6191,18 @@ mockedApiResponse.oembed = { ], "args": { "url": { - "required": true, "description": "The URL of the resource for which to fetch oEmbed data.", - "type": "string" + "type": "string", + "format": "uri", + "required": true }, "format": { - "required": false, - "default": "json" + "default": "json", + "required": false }, "maxwidth": { - "required": false, - "default": 600 + "default": 600, + "required": false } } } @@ -5321,36 +6223,37 @@ mockedApiResponse.oembed = { ], "args": { "url": { - "required": true, "description": "The URL of the resource for which to fetch oEmbed data.", - "type": "string" + "type": "string", + "format": "uri", + "required": true }, "format": { - "required": false, + "description": "The oEmbed format to use.", + "type": "string", "default": "json", "enum": [ "json", "xml" ], - "description": "The oEmbed format to use.", - "type": "string" + "required": false }, "maxwidth": { - "required": false, - "default": 600, "description": "The maximum width of the embed frame in pixels.", - "type": "integer" + "type": "integer", + "default": 600, + "required": false }, "maxheight": { - "required": false, "description": "The maximum height of the embed frame in pixels.", - "type": "integer" + "type": "integer", + "required": false }, "discover": { - "required": false, - "default": true, "description": "Whether to perform an oEmbed discovery request for unsanctioned providers.", - "type": "boolean" + "type": "boolean", + "default": true, + "required": false } } }