From 3ef5d4489d557586e1e80100424edfb917405bb8 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Fri, 3 May 2024 12:12:11 +0400 Subject: [PATCH 1/6] Options: Add 'label' argument to register_setting --- src/wp-includes/option.php | 3 +++ .../rest-api/endpoints/class-wp-rest-settings-controller.php | 1 + 2 files changed, 4 insertions(+) diff --git a/src/wp-includes/option.php b/src/wp-includes/option.php index 0c5247f1a54f1..307df528e08fe 100644 --- a/src/wp-includes/option.php +++ b/src/wp-includes/option.php @@ -2769,6 +2769,7 @@ function register_initial_settings() { * @since 4.7.0 `$args` can be passed to set flags on the setting, similar to `register_meta()`. * @since 5.5.0 `$new_whitelist_options` was renamed to `$new_allowed_options`. * Please consider writing more inclusive code. + * @since 6.6.0 Added the `label` argument. * * @global array $new_allowed_options * @global array $wp_registered_settings @@ -2782,6 +2783,7 @@ function register_initial_settings() { * * @type string $type The type of data associated with this setting. * Valid values are 'string', 'boolean', 'integer', 'number', 'array', and 'object'. + * @type string $label A label of the data attached to this setting. * @type string $description A description of the data attached to this setting. * @type callable $sanitize_callback A callback function that sanitizes the option's value. * @type bool|array $show_in_rest Whether data associated with this setting should be included in the REST API. @@ -2802,6 +2804,7 @@ function register_setting( $option_group, $option_name, $args = array() ) { $defaults = array( 'type' => 'string', 'group' => $option_group, + 'label' => '', 'description' => '', 'sanitize_callback' => null, 'show_in_rest' => false, diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php index 365afd39d2fa8..90d912583a410 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php @@ -237,6 +237,7 @@ protected function get_registered_options() { $default_schema = array( 'type' => empty( $args['type'] ) ? null : $args['type'], + 'label' => empty( $args['label'] ) ? '' : $args['label'], 'description' => empty( $args['description'] ) ? '' : $args['description'], 'default' => isset( $args['default'] ) ? $args['default'] : null, ); From 8f0590608017e167d1c554bbf61c51b824051c7d Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Fri, 3 May 2024 12:38:16 +0400 Subject: [PATCH 2/6] Add labels for the settings used by the block editor --- src/wp-includes/option.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wp-includes/option.php b/src/wp-includes/option.php index 307df528e08fe..78b45e8adf31e 100644 --- a/src/wp-includes/option.php +++ b/src/wp-includes/option.php @@ -2554,6 +2554,7 @@ function register_initial_settings() { 'name' => 'title', ), 'type' => 'string', + 'label' => __( 'Title' ), 'description' => __( 'Site title.' ), ) ); @@ -2566,6 +2567,7 @@ function register_initial_settings() { 'name' => 'description', ), 'type' => 'string', + 'label' => __( 'Tagline' ), 'description' => __( 'Site tagline.' ), ) ); @@ -2696,6 +2698,7 @@ function register_initial_settings() { array( 'show_in_rest' => true, 'type' => 'integer', + 'label' => __( 'Maximum posts per page' ), 'description' => __( 'Blog pages show at most.' ), 'default' => 10, ) @@ -2707,6 +2710,7 @@ function register_initial_settings() { array( 'show_in_rest' => true, 'type' => 'string', + 'label' => __( 'Show on front' ), 'description' => __( 'What to show on the front page' ), ) ); @@ -2717,6 +2721,7 @@ function register_initial_settings() { array( 'show_in_rest' => true, 'type' => 'integer', + 'label' => __( 'Page on front' ), 'description' => __( 'The ID of the page that should be displayed on the front page' ), ) ); @@ -2755,6 +2760,7 @@ function register_initial_settings() { ), ), 'type' => 'string', + 'label' => __( 'Allow comments on new posts' ), 'description' => __( 'Allow people to submit comments on new posts.' ), ) ); From 04d1a06596e5cf1962e86c81f133b54cc2e1054e Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Fri, 3 May 2024 13:40:16 +0400 Subject: [PATCH 3/6] Add unit test --- .../tests/rest-api/rest-settings-controller.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/phpunit/tests/rest-api/rest-settings-controller.php b/tests/phpunit/tests/rest-api/rest-settings-controller.php index d9181e1af8c16..6f167d43f2199 100644 --- a/tests/phpunit/tests/rest-api/rest-settings-controller.php +++ b/tests/phpunit/tests/rest-api/rest-settings-controller.php @@ -781,4 +781,19 @@ public function test_register_setting_with_custom_additional_properties_value() $this->assertSame( 2, $response->data['mycustomsetting']['test2'] ); $this->assertSame( 3, $response->data['mycustomsetting']['test3'] ); } + + /** + * @ticket 61023 + */ + public function test_provides_setting_metadata_in_schema() { + $request = new WP_REST_Request( 'OPTIONS', '/wp/v2/settings' ); + $response = rest_get_server()->dispatch( $request ); + $data = $response->get_data(); + $title = $data['schema']['properties']['title']; + + $this->assertSame( 'string', $title['type'] ); + $this->assertSame( 'Title', $title['label'] ); + $this->assertSame( 'Site title.', $title['description'] ); + $this->assertSame( null, $title['default'] ); + } } From 06366dc6598fbe1ccd7604a5864f5b795a3985eb Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Fri, 3 May 2024 15:01:35 +0400 Subject: [PATCH 4/6] Match schema specs --- .../rest-api/endpoints/class-wp-rest-settings-controller.php | 2 +- tests/phpunit/tests/rest-api/rest-settings-controller.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php index 90d912583a410..004f5851a271f 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php @@ -237,7 +237,7 @@ protected function get_registered_options() { $default_schema = array( 'type' => empty( $args['type'] ) ? null : $args['type'], - 'label' => empty( $args['label'] ) ? '' : $args['label'], + 'title' => empty( $args['label'] ) ? '' : $args['label'], 'description' => empty( $args['description'] ) ? '' : $args['description'], 'default' => isset( $args['default'] ) ? $args['default'] : null, ); diff --git a/tests/phpunit/tests/rest-api/rest-settings-controller.php b/tests/phpunit/tests/rest-api/rest-settings-controller.php index 6f167d43f2199..e8f90b53f20f1 100644 --- a/tests/phpunit/tests/rest-api/rest-settings-controller.php +++ b/tests/phpunit/tests/rest-api/rest-settings-controller.php @@ -792,7 +792,7 @@ public function test_provides_setting_metadata_in_schema() { $title = $data['schema']['properties']['title']; $this->assertSame( 'string', $title['type'] ); - $this->assertSame( 'Title', $title['label'] ); + $this->assertSame( 'Title', $title['title'] ); $this->assertSame( 'Site title.', $title['description'] ); $this->assertSame( null, $title['default'] ); } From 22c9237af4c24e7d11fd48a4975af15ced0406c7 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Fri, 3 May 2024 17:25:00 +0400 Subject: [PATCH 5/6] Update WP API fixtures --- tests/qunit/fixtures/wp-api-generated.js | 4758 +++++++++++----------- 1 file changed, 2386 insertions(+), 2372 deletions(-) diff --git a/tests/qunit/fixtures/wp-api-generated.js b/tests/qunit/fixtures/wp-api-generated.js index 928ea25e08f89..6743ef3a1a8d6 100644 --- a/tests/qunit/fixtures/wp-api-generated.js +++ b/tests/qunit/fixtures/wp-api-generated.js @@ -18,13 +18,7 @@ mockedApiResponse.Schema = { "wp-site-health/v1", "wp-block-editor/v1" ], - "authentication": { - "application-passwords": { - "endpoints": { - "authorization": "http://example.org/wp-admin/authorize-application.php" - } - } - }, + "authentication": [], "routes": { "/": { "namespace": "", @@ -2717,7 +2711,7 @@ mockedApiResponse.Schema = { } ] }, - "/wp/v2/menu-items": { + "/wp/v2/media": { "namespace": "wp/v2", "methods": [ "GET", @@ -2728,9 +2722,6 @@ mockedApiResponse.Schema = { "methods": [ "GET" ], - "allow_batch": { - "v1": true - }, "args": { "context": { "description": "Scope under which the request is made; determines fields present in response.", @@ -2753,7 +2744,7 @@ mockedApiResponse.Schema = { "per_page": { "description": "Maximum number of items to be returned in result set.", "type": "integer", - "default": 100, + "default": 10, "minimum": 1, "maximum": 100, "required": false @@ -2775,6 +2766,24 @@ mockedApiResponse.Schema = { "format": "date-time", "required": false }, + "author": { + "description": "Limit result set to posts assigned to specific authors.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "author_exclude": { + "description": "Ensure result set excludes posts assigned to specific authors.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, "before": { "description": "Limit response to posts published before a given ISO8601 compliant date.", "type": "string", @@ -2813,7 +2822,7 @@ mockedApiResponse.Schema = { "order": { "description": "Order sort attribute ascending or descending.", "type": "string", - "default": "asc", + "default": "desc", "enum": [ "asc", "desc" @@ -2821,9 +2830,9 @@ mockedApiResponse.Schema = { "required": false }, "orderby": { - "description": "Sort collection by object attribute.", + "description": "Sort collection by post attribute.", "type": "string", - "default": "menu_order", + "default": "date", "enum": [ "author", "date", @@ -2834,11 +2843,28 @@ mockedApiResponse.Schema = { "relevance", "slug", "include_slugs", - "title", - "menu_order" + "title" ], "required": false }, + "parent": { + "description": "Limit result set to items with particular parent IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "parent_exclude": { + "description": "Limit result set to all items except those of a particular parent ID.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, "search_columns": { "default": [], "description": "Array of column names to be searched.", @@ -2862,118 +2888,36 @@ mockedApiResponse.Schema = { "required": false }, "status": { - "default": "publish", + "default": "inherit", "description": "Limit result set to posts assigned one or more statuses.", "type": "array", "items": { "enum": [ - "publish", - "future", - "draft", - "pending", - "private", - "trash", - "auto-draft", "inherit", - "request-pending", - "request-confirmed", - "request-failed", - "request-completed", - "any" + "private", + "trash" ], "type": "string" }, "required": false }, - "tax_relation": { - "description": "Limit result set based on relationship between multiple taxonomies.", + "media_type": { + "default": null, + "description": "Limit result set to attachments of a particular media type.", "type": "string", "enum": [ - "AND", - "OR" - ], - "required": false - }, - "menus": { - "description": "Limit result set to items with specific terms assigned in the menus taxonomy.", - "type": [ - "object", - "array" - ], - "oneOf": [ - { - "title": "Term ID List", - "description": "Match terms with the listed IDs.", - "type": "array", - "items": { - "type": "integer" - } - }, - { - "title": "Term ID Taxonomy Query", - "description": "Perform an advanced term query.", - "type": "object", - "properties": { - "terms": { - "description": "Term IDs.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [] - }, - "operator": { - "description": "Whether items must be assigned all or any of the specified terms.", - "type": "string", - "enum": [ - "AND", - "OR" - ], - "default": "OR" - } - }, - "additionalProperties": false - } - ], - "required": false - }, - "menus_exclude": { - "description": "Limit result set to items except those with specific terms assigned in the menus taxonomy.", - "type": [ - "object", - "array" - ], - "oneOf": [ - { - "title": "Term ID List", - "description": "Match terms with the listed IDs.", - "type": "array", - "items": { - "type": "integer" - } - }, - { - "title": "Term ID Taxonomy Query", - "description": "Perform an advanced term query.", - "type": "object", - "properties": { - "terms": { - "description": "Term IDs.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [] - } - }, - "additionalProperties": false - } + "image", + "video", + "text", + "application", + "audio" ], "required": false }, - "menu_order": { - "description": "Limit result set to posts with a specific menu_order value.", - "type": "integer", + "mime_type": { + "default": null, + "description": "Limit result set to attachments of a particular MIME type.", + "type": "string", "required": false } } @@ -2982,26 +2926,55 @@ mockedApiResponse.Schema = { "methods": [ "POST" ], - "allow_batch": { - "v1": true - }, "args": { - "title": { - "description": "The title for the object.", + "date": { + "description": "The date the post was published, in the site's timezone.", "type": [ "string", - "object" + "null" + ], + "format": "date-time", + "required": false + }, + "date_gmt": { + "description": "The date the post was published, as GMT.", + "type": [ + "string", + "null" + ], + "format": "date-time", + "required": false + }, + "slug": { + "description": "An alphanumeric identifier for the post unique to its type.", + "type": "string", + "required": false + }, + "status": { + "description": "A named status for the post.", + "type": "string", + "enum": [ + "publish", + "future", + "draft", + "pending", + "private" ], + "required": false + }, + "title": { + "description": "The title for the post.", + "type": "object", "properties": { "raw": { - "description": "Title for the object, as it exists in the database.", + "description": "Title for the post, as it exists in the database.", "type": "string", "context": [ "edit" ] }, "rendered": { - "description": "HTML title for the object, transformed for display.", + "description": "HTML title for the post, transformed for display.", "type": "string", "context": [ "view", @@ -3013,121 +2986,110 @@ mockedApiResponse.Schema = { }, "required": false }, - "type": { - "default": "custom", - "description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\".", + "author": { + "description": "The ID for the author of the post.", + "type": "integer", + "required": false + }, + "featured_media": { + "description": "The ID of the featured media for the post.", + "type": "integer", + "required": false + }, + "comment_status": { + "description": "Whether or not comments are open on the post.", "type": "string", "enum": [ - "taxonomy", - "post_type", - "post_type_archive", - "custom" + "open", + "closed" ], "required": false }, - "status": { - "default": "publish", - "description": "A named status for the object.", + "ping_status": { + "description": "Whether or not the post can be pinged.", "type": "string", "enum": [ - "publish", - "future", - "draft", - "pending", - "private" + "open", + "closed" ], "required": false }, - "parent": { - "default": 0, - "description": "The ID for the parent of the object.", - "type": "integer", - "minimum": 0, + "meta": { + "description": "Meta fields.", + "type": "object", + "properties": [], "required": false }, - "attr_title": { - "description": "Text for the title attribute of the link element for this menu item.", - "type": "string", - "required": false - }, - "classes": { - "description": "Class names for the link element of this menu item.", - "type": "array", - "items": { - "type": "string" - }, - "required": false - }, - "description": { - "description": "The description of this menu item.", - "type": "string", - "required": false - }, - "menu_order": { - "default": 1, - "description": "The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0.", - "type": "integer", - "minimum": 1, - "required": false - }, - "object": { - "description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\".", + "template": { + "description": "The theme file to use to display the post.", "type": "string", "required": false }, - "object_id": { - "default": 0, - "description": "The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories.", - "type": "integer", - "minimum": 0, - "required": false - }, - "target": { - "description": "The target attribute of the link element for this menu item.", + "alt_text": { + "description": "Alternative text to display when attachment is not displayed.", "type": "string", - "enum": [ - "_blank", - "" - ], "required": false }, - "url": { - "description": "The URL to which this menu item points.", - "type": "string", - "format": "uri", + "caption": { + "description": "The attachment caption.", + "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 }, - "xfn": { - "description": "The XFN relationship expressed in the link of this menu item.", - "type": "array", - "items": { - "type": "string" + "description": { + "description": "The attachment description.", + "type": "object", + "properties": { + "raw": { + "description": "Description for the attachment, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML description for the attachment, transformed for display.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + } }, "required": false }, - "menus": { - "description": "The terms assigned to the object in the nav_menu taxonomy.", + "post": { + "description": "The ID for the associated post of the attachment.", "type": "integer", "required": false - }, - "meta": { - "description": "Meta fields.", - "type": "object", - "properties": [], - "required": false } } } ], "_links": { - "self": [ - { - "href": "http://example.org/index.php?rest_route=/wp/v2/menu-items" - } - ] + "self": "http://example.org/index.php?rest_route=/wp/v2/media" } }, - "/wp/v2/menu-items/(?P[\\d]+)": { + "/wp/v2/media/(?P[\\d]+)": { "namespace": "wp/v2", "methods": [ "GET", @@ -3141,9 +3103,6 @@ mockedApiResponse.Schema = { "methods": [ "GET" ], - "allow_batch": { - "v1": true - }, "args": { "id": { "description": "Unique identifier for the post.", @@ -3169,31 +3128,60 @@ mockedApiResponse.Schema = { "PUT", "PATCH" ], - "allow_batch": { - "v1": true - }, "args": { "id": { "description": "Unique identifier for the post.", "type": "integer", "required": false }, - "title": { - "description": "The title for the object.", + "date": { + "description": "The date the post was published, in the site's timezone.", "type": [ "string", - "object" + "null" + ], + "format": "date-time", + "required": false + }, + "date_gmt": { + "description": "The date the post was published, as GMT.", + "type": [ + "string", + "null" + ], + "format": "date-time", + "required": false + }, + "slug": { + "description": "An alphanumeric identifier for the post unique to its type.", + "type": "string", + "required": false + }, + "status": { + "description": "A named status for the post.", + "type": "string", + "enum": [ + "publish", + "future", + "draft", + "pending", + "private" ], + "required": false + }, + "title": { + "description": "The title for the post.", + "type": "object", "properties": { "raw": { - "description": "Title for the object, as it exists in the database.", + "description": "Title for the post, as it exists in the database.", "type": "string", "context": [ "edit" ] }, "rendered": { - "description": "HTML title for the object, transformed for display.", + "description": "HTML title for the post, transformed for display.", "type": "string", "context": [ "view", @@ -3205,103 +3193,101 @@ mockedApiResponse.Schema = { }, "required": false }, - "type": { - "description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\".", + "author": { + "description": "The ID for the author of the post.", + "type": "integer", + "required": false + }, + "featured_media": { + "description": "The ID of the featured media for the post.", + "type": "integer", + "required": false + }, + "comment_status": { + "description": "Whether or not comments are open on the post.", "type": "string", "enum": [ - "taxonomy", - "post_type", - "post_type_archive", - "custom" + "open", + "closed" ], "required": false }, - "status": { - "description": "A named status for the object.", + "ping_status": { + "description": "Whether or not the post can be pinged.", "type": "string", "enum": [ - "publish", - "future", - "draft", - "pending", - "private" + "open", + "closed" ], "required": false }, - "parent": { - "description": "The ID for the parent of the object.", - "type": "integer", - "minimum": 0, + "meta": { + "description": "Meta fields.", + "type": "object", + "properties": [], "required": false }, - "attr_title": { - "description": "Text for the title attribute of the link element for this menu item.", + "template": { + "description": "The theme file to use to display the post.", "type": "string", "required": false }, - "classes": { - "description": "Class names for the link element of this menu item.", - "type": "array", - "items": { - "type": "string" + "alt_text": { + "description": "Alternative text to display when attachment is not displayed.", + "type": "string", + "required": false + }, + "caption": { + "description": "The attachment caption.", + "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": { - "description": "The description of this menu item.", - "type": "string", + "description": "The attachment description.", + "type": "object", + "properties": { + "raw": { + "description": "Description for the attachment, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML description for the attachment, transformed for display.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + } + }, "required": false }, - "menu_order": { - "description": "The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0.", - "type": "integer", - "minimum": 1, - "required": false - }, - "object": { - "description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\".", - "type": "string", - "required": false - }, - "object_id": { - "description": "The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories.", - "type": "integer", - "minimum": 0, - "required": false - }, - "target": { - "description": "The target attribute of the link element for this menu item.", - "type": "string", - "enum": [ - "_blank", - "" - ], - "required": false - }, - "url": { - "description": "The URL to which this menu item points.", - "type": "string", - "format": "uri", - "required": false - }, - "xfn": { - "description": "The XFN relationship expressed in the link of this menu item.", - "type": "array", - "items": { - "type": "string" - }, - "required": false - }, - "menus": { - "description": "The terms assigned to the object in the nav_menu taxonomy.", + "post": { + "description": "The ID for the associated post of the attachment.", "type": "integer", "required": false - }, - "meta": { - "description": "Meta fields.", - "type": "object", - "properties": [], - "required": false } } }, @@ -3309,9 +3295,6 @@ mockedApiResponse.Schema = { "methods": [ "DELETE" ], - "allow_batch": { - "v1": true - }, "args": { "id": { "description": "Unique identifier for the post.", @@ -3328,207 +3311,173 @@ mockedApiResponse.Schema = { } ] }, - "/wp/v2/menu-items/(?P[\\d]+)/autosaves": { + "/wp/v2/media/(?P[\\d]+)/post-process": { "namespace": "wp/v2", "methods": [ - "GET", "POST" ], "endpoints": [ { "methods": [ - "GET" + "POST" ], "args": { - "parent": { - "description": "The ID for the parent of the autosave.", + "id": { + "description": "Unique identifier for the attachment.", "type": "integer", "required": false }, - "context": { - "description": "Scope under which the request is made; determines fields present in response.", + "action": { "type": "string", "enum": [ - "view", - "embed", - "edit" + "create-image-subsizes" ], - "default": "view", - "required": false + "required": true } } - }, + } + ] + }, + "/wp/v2/media/(?P[\\d]+)/edit": { + "namespace": "wp/v2", + "methods": [ + "POST" + ], + "endpoints": [ { "methods": [ "POST" ], "args": { - "parent": { - "description": "The ID for the parent of the object.", - "type": "integer", - "minimum": 0, - "required": false - }, - "title": { - "description": "The title for the object.", - "type": [ - "string", - "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 - }, - "type": { - "description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\".", - "type": "string", - "enum": [ - "taxonomy", - "post_type", - "post_type_archive", - "custom" - ], - "required": false - }, - "status": { - "description": "A named status for the object.", - "type": "string", - "enum": [ - "publish", - "future", - "draft", - "pending", - "private" - ], - "required": false - }, - "attr_title": { - "description": "Text for the title attribute of the link element for this menu item.", + "src": { + "description": "URL to the edited image file.", "type": "string", - "required": false + "format": "uri", + "required": true }, - "classes": { - "description": "Class names for the link element of this menu item.", + "modifiers": { + "description": "Array of image edits.", "type": "array", + "minItems": 1, "items": { - "type": "string" + "description": "Image edit.", + "type": "object", + "required": [ + "type", + "args" + ], + "oneOf": [ + { + "title": "Rotation", + "properties": { + "type": { + "description": "Rotation type.", + "type": "string", + "enum": [ + "rotate" + ] + }, + "args": { + "description": "Rotation arguments.", + "type": "object", + "required": [ + "angle" + ], + "properties": { + "angle": { + "description": "Angle to rotate clockwise in degrees.", + "type": "number" + } + } + } + } + }, + { + "title": "Crop", + "properties": { + "type": { + "description": "Crop type.", + "type": "string", + "enum": [ + "crop" + ] + }, + "args": { + "description": "Crop arguments.", + "type": "object", + "required": [ + "left", + "top", + "width", + "height" + ], + "properties": { + "left": { + "description": "Horizontal position from the left to begin the crop as a percentage of the image width.", + "type": "number" + }, + "top": { + "description": "Vertical position from the top to begin the crop as a percentage of the image height.", + "type": "number" + }, + "width": { + "description": "Width of the crop as a percentage of the image width.", + "type": "number" + }, + "height": { + "description": "Height of the crop as a percentage of the image height.", + "type": "number" + } + } + } + } + } + ] }, "required": false }, - "description": { - "description": "The description of this menu item.", - "type": "string", - "required": false - }, - "menu_order": { - "description": "The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0.", + "rotation": { + "description": "The amount to rotate the image clockwise in degrees. DEPRECATED: Use `modifiers` instead.", "type": "integer", - "minimum": 1, + "minimum": 0, + "exclusiveMinimum": true, + "maximum": 360, + "exclusiveMaximum": true, "required": false }, - "object": { - "description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\".", - "type": "string", + "x": { + "description": "As a percentage of the image, the x position to start the crop from. DEPRECATED: Use `modifiers` instead.", + "type": "number", + "minimum": 0, + "maximum": 100, "required": false }, - "object_id": { - "description": "The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories.", - "type": "integer", + "y": { + "description": "As a percentage of the image, the y position to start the crop from. DEPRECATED: Use `modifiers` instead.", + "type": "number", "minimum": 0, + "maximum": 100, "required": false }, - "target": { - "description": "The target attribute of the link element for this menu item.", - "type": "string", - "enum": [ - "_blank", - "" - ], - "required": false - }, - "url": { - "description": "The URL to which this menu item points.", - "type": "string", - "format": "uri", - "required": false - }, - "xfn": { - "description": "The XFN relationship expressed in the link of this menu item.", - "type": "array", - "items": { - "type": "string" - }, - "required": false - }, - "menus": { - "description": "The terms assigned to the object in the nav_menu taxonomy.", - "type": "integer", - "required": false - }, - "meta": { - "description": "Meta fields.", - "type": "object", - "properties": [], - "required": false - } - } - } - ] - }, - "/wp/v2/menu-items/(?P[\\d]+)/autosaves/(?P[\\d]+)": { - "namespace": "wp/v2", - "methods": [ - "GET" - ], - "endpoints": [ - { - "methods": [ - "GET" - ], - "args": { - "parent": { - "description": "The ID for the parent of the autosave.", - "type": "integer", - "required": false - }, - "id": { - "description": "The ID for the autosave.", - "type": "integer", + "width": { + "description": "As a percentage of the image, the width to crop the image to. DEPRECATED: Use `modifiers` instead.", + "type": "number", + "minimum": 0, + "maximum": 100, "required": false }, - "context": { - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string", - "enum": [ - "view", - "embed", - "edit" - ], - "default": "view", + "height": { + "description": "As a percentage of the image, the height to crop the image to. DEPRECATED: Use `modifiers` instead.", + "type": "number", + "minimum": 0, + "maximum": 100, "required": false } } } ] }, - "/wp/v2/blocks": { + "/wp/v2/menu-items": { "namespace": "wp/v2", "methods": [ "GET", @@ -3564,7 +3513,7 @@ mockedApiResponse.Schema = { "per_page": { "description": "Maximum number of items to be returned in result set.", "type": "integer", - "default": 10, + "default": 100, "minimum": 1, "maximum": 100, "required": false @@ -3624,7 +3573,7 @@ mockedApiResponse.Schema = { "order": { "description": "Order sort attribute ascending or descending.", "type": "string", - "default": "desc", + "default": "asc", "enum": [ "asc", "desc" @@ -3632,9 +3581,9 @@ mockedApiResponse.Schema = { "required": false }, "orderby": { - "description": "Sort collection by post attribute.", + "description": "Sort collection by object attribute.", "type": "string", - "default": "date", + "default": "menu_order", "enum": [ "author", "date", @@ -3645,7 +3594,8 @@ mockedApiResponse.Schema = { "relevance", "slug", "include_slugs", - "title" + "title", + "menu_order" ], "required": false }, @@ -3704,8 +3654,8 @@ mockedApiResponse.Schema = { ], "required": false }, - "wp_pattern_category": { - "description": "Limit result set to items with specific terms assigned in the wp_pattern_category taxonomy.", + "menus": { + "description": "Limit result set to items with specific terms assigned in the menus taxonomy.", "type": [ "object", "array" @@ -3747,8 +3697,8 @@ mockedApiResponse.Schema = { ], "required": false }, - "wp_pattern_category_exclude": { - "description": "Limit result set to items except those with specific terms assigned in the wp_pattern_category taxonomy.", + "menus_exclude": { + "description": "Limit result set to items except those with specific terms assigned in the menus taxonomy.", "type": [ "object", "array" @@ -3780,6 +3730,11 @@ mockedApiResponse.Schema = { } ], "required": false + }, + "menu_order": { + "description": "Limit result set to posts with a specific menu_order value.", + "type": "integer", + "required": false } } }, @@ -3791,31 +3746,48 @@ mockedApiResponse.Schema = { "v1": true }, "args": { - "date": { - "description": "The date the post was published, in the site's timezone.", - "type": [ - "string", - "null" - ], - "format": "date-time", - "required": false - }, - "date_gmt": { - "description": "The date the post was published, as GMT.", + "title": { + "description": "The title for the object.", "type": [ "string", - "null" + "object" ], - "format": "date-time", + "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 }, - "slug": { - "description": "An alphanumeric identifier for the post unique to its type.", + "type": { + "default": "custom", + "description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\".", "type": "string", + "enum": [ + "taxonomy", + "post_type", + "post_type_archive", + "custom" + ], "required": false }, "status": { - "description": "A named status for the post.", + "default": "publish", + "description": "A named status for the object.", "type": "string", "enum": [ "publish", @@ -3826,49 +3798,163 @@ mockedApiResponse.Schema = { ], "required": false }, - "password": { - "description": "A password to protect access to the content and excerpt.", + "parent": { + "default": 0, + "description": "The ID for the parent of the object.", + "type": "integer", + "minimum": 0, + "required": false + }, + "attr_title": { + "description": "Text for the title attribute of the link element for this menu item.", "type": "string", "required": false }, - "title": { - "description": "The title for the post.", - "type": "object", - "properties": { - "raw": { - "description": "Title for the post, as it exists in the database.", - "type": "string", - "context": [ - "view", - "edit" - ] - } + "classes": { + "description": "Class names for the link element of this menu item.", + "type": "array", + "items": { + "type": "string" }, "required": false }, - "content": { - "description": "The content for the post.", + "description": { + "description": "The description of this menu item.", + "type": "string", + "required": false + }, + "menu_order": { + "default": 1, + "description": "The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0.", + "type": "integer", + "minimum": 1, + "required": false + }, + "object": { + "description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\".", + "type": "string", + "required": false + }, + "object_id": { + "default": 0, + "description": "The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories.", + "type": "integer", + "minimum": 0, + "required": false + }, + "target": { + "description": "The target attribute of the link element for this menu item.", + "type": "string", + "enum": [ + "_blank", + "" + ], + "required": false + }, + "url": { + "description": "The URL to which this menu item points.", + "type": "string", + "format": "uri", + "required": false + }, + "xfn": { + "description": "The XFN relationship expressed in the link of this menu item.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "menus": { + "description": "The terms assigned to the object in the nav_menu taxonomy.", + "type": "integer", + "required": false + }, + "meta": { + "description": "Meta fields.", "type": "object", + "properties": [], + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "http://example.org/index.php?rest_route=/wp/v2/menu-items" + } + ] + } + }, + "/wp/v2/menu-items/(?P[\\d]+)": { + "namespace": "wp/v2", + "methods": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "allow_batch": { + "v1": true + }, + "args": { + "id": { + "description": "Unique identifier for the post.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "embed", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "allow_batch": { + "v1": true + }, + "args": { + "id": { + "description": "Unique identifier for the post.", + "type": "integer", + "required": false + }, + "title": { + "description": "The title for the object.", + "type": [ + "string", + "object" + ], "properties": { "raw": { - "description": "Content for the post, as it exists in the database.", + "description": "Title 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 post.", - "type": "integer", - "context": [ - "edit" - ], - "readonly": true - }, - "protected": { - "description": "Whether the content is protected with a password.", - "type": "boolean", + "rendered": { + "description": "HTML title for the object, transformed for display.", + "type": "string", "context": [ "view", "edit", @@ -3879,52 +3965,143 @@ mockedApiResponse.Schema = { }, "required": false }, - "meta": { - "description": "Meta fields.", - "type": "object", - "properties": [], + "type": { + "description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\".", + "type": "string", + "enum": [ + "taxonomy", + "post_type", + "post_type_archive", + "custom" + ], + "required": false + }, + "status": { + "description": "A named status for the object.", + "type": "string", + "enum": [ + "publish", + "future", + "draft", + "pending", + "private" + ], + "required": false + }, + "parent": { + "description": "The ID for the parent of the object.", + "type": "integer", + "minimum": 0, + "required": false + }, + "attr_title": { + "description": "Text for the title attribute of the link element for this menu item.", + "type": "string", + "required": false + }, + "classes": { + "description": "Class names for the link element of this menu item.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "description": { + "description": "The description of this menu item.", + "type": "string", + "required": false + }, + "menu_order": { + "description": "The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0.", + "type": "integer", + "minimum": 1, + "required": false + }, + "object": { + "description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\".", + "type": "string", + "required": false + }, + "object_id": { + "description": "The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories.", + "type": "integer", + "minimum": 0, "required": false }, - "template": { - "description": "The theme file to use to display the post.", + "target": { + "description": "The target attribute of the link element for this menu item.", + "type": "string", + "enum": [ + "_blank", + "" + ], + "required": false + }, + "url": { + "description": "The URL to which this menu item points.", "type": "string", + "format": "uri", "required": false }, - "wp_pattern_category": { - "description": "The terms assigned to the post in the wp_pattern_category taxonomy.", + "xfn": { + "description": "The XFN relationship expressed in the link of this menu item.", "type": "array", "items": { - "type": "integer" + "type": "string" }, "required": false + }, + "menus": { + "description": "The terms assigned to the object in the nav_menu taxonomy.", + "type": "integer", + "required": false + }, + "meta": { + "description": "Meta fields.", + "type": "object", + "properties": [], + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "allow_batch": { + "v1": true + }, + "args": { + "id": { + "description": "Unique identifier for the post.", + "type": "integer", + "required": false + }, + "force": { + "type": "boolean", + "default": false, + "description": "Whether to bypass Trash and force deletion.", + "required": false } } } - ], - "_links": { - "self": "http://example.org/index.php?rest_route=/wp/v2/blocks" - } + ] }, - "/wp/v2/blocks/(?P[\\d]+)": { + "/wp/v2/menu-items/(?P[\\d]+)/autosaves": { "namespace": "wp/v2", "methods": [ "GET", - "POST", - "PUT", - "PATCH", - "DELETE" + "POST" ], "endpoints": [ { "methods": [ "GET" ], - "allow_batch": { - "v1": true - }, "args": { - "id": { - "description": "Unique identifier for the post.", + "parent": { + "description": "The ID for the parent of the autosave.", "type": "integer", "required": false }, @@ -3938,54 +4115,60 @@ mockedApiResponse.Schema = { ], "default": "view", "required": false - }, - "password": { - "description": "The password for the post if it is password protected.", - "type": "string", - "required": false } } }, { "methods": [ - "POST", - "PUT", - "PATCH" + "POST" ], - "allow_batch": { - "v1": true - }, "args": { - "id": { - "description": "Unique identifier for the post.", + "parent": { + "description": "The ID for the parent of the object.", "type": "integer", + "minimum": 0, "required": false }, - "date": { - "description": "The date the post was published, in the site's timezone.", - "type": [ - "string", - "null" - ], - "format": "date-time", - "required": false - }, - "date_gmt": { - "description": "The date the post was published, as GMT.", + "title": { + "description": "The title for the object.", "type": [ "string", - "null" + "object" ], - "format": "date-time", + "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 }, - "slug": { - "description": "An alphanumeric identifier for the post unique to its type.", + "type": { + "description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\".", "type": "string", + "enum": [ + "taxonomy", + "post_type", + "post_type_archive", + "custom" + ], "required": false }, "status": { - "description": "A named status for the post.", + "description": "A named status for the object.", "type": "string", "enum": [ "publish", @@ -3996,119 +4179,130 @@ mockedApiResponse.Schema = { ], "required": false }, - "password": { - "description": "A password to protect access to the content and excerpt.", + "attr_title": { + "description": "Text for the title attribute of the link element for this menu item.", "type": "string", "required": false }, - "title": { - "description": "The title for the post.", - "type": "object", - "properties": { - "raw": { - "description": "Title for the post, as it exists in the database.", - "type": "string", - "context": [ - "view", - "edit" - ] - } + "classes": { + "description": "Class names for the link element of this menu item.", + "type": "array", + "items": { + "type": "string" }, "required": false }, - "content": { - "description": "The content for the post.", - "type": "object", - "properties": { - "raw": { - "description": "Content for the post, as it exists in the database.", - "type": "string", - "context": [ - "view", - "edit" - ] - }, - "block_version": { - "description": "Version of the content block format used by the post.", - "type": "integer", - "context": [ - "edit" - ], - "readonly": true - }, - "protected": { - "description": "Whether the content is protected with a password.", - "type": "boolean", - "context": [ - "view", - "edit", - "embed" - ], - "readonly": true - } - }, + "description": { + "description": "The description of this menu item.", + "type": "string", "required": false }, - "meta": { - "description": "Meta fields.", - "type": "object", - "properties": [], + "menu_order": { + "description": "The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0.", + "type": "integer", + "minimum": 1, "required": false }, - "template": { - "description": "The theme file to use to display the post.", + "object": { + "description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\".", "type": "string", "required": false }, - "wp_pattern_category": { - "description": "The terms assigned to the post in the wp_pattern_category taxonomy.", + "object_id": { + "description": "The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories.", + "type": "integer", + "minimum": 0, + "required": false + }, + "target": { + "description": "The target attribute of the link element for this menu item.", + "type": "string", + "enum": [ + "_blank", + "" + ], + "required": false + }, + "url": { + "description": "The URL to which this menu item points.", + "type": "string", + "format": "uri", + "required": false + }, + "xfn": { + "description": "The XFN relationship expressed in the link of this menu item.", "type": "array", "items": { - "type": "integer" + "type": "string" }, "required": false + }, + "menus": { + "description": "The terms assigned to the object in the nav_menu taxonomy.", + "type": "integer", + "required": false + }, + "meta": { + "description": "Meta fields.", + "type": "object", + "properties": [], + "required": false } } - }, + } + ] + }, + "/wp/v2/menu-items/(?P[\\d]+)/autosaves/(?P[\\d]+)": { + "namespace": "wp/v2", + "methods": [ + "GET" + ], + "endpoints": [ { "methods": [ - "DELETE" + "GET" ], - "allow_batch": { - "v1": true - }, "args": { + "parent": { + "description": "The ID for the parent of the autosave.", + "type": "integer", + "required": false + }, "id": { - "description": "Unique identifier for the post.", + "description": "The ID for the autosave.", "type": "integer", "required": false }, - "force": { - "type": "boolean", - "default": false, - "description": "Whether to bypass Trash and force deletion.", + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "embed", + "edit" + ], + "default": "view", "required": false } } } ] }, - "/wp/v2/blocks/(?P[\\d]+)/revisions": { + "/wp/v2/blocks": { "namespace": "wp/v2", "methods": [ - "GET" + "GET", + "POST" ], "endpoints": [ { "methods": [ "GET" ], + "allow_batch": { + "v1": true + }, "args": { - "parent": { - "description": "The ID for the parent of the revision.", - "type": "integer", - "required": false - }, "context": { "description": "Scope under which the request is made; determines fields present in response.", "type": "string", @@ -4130,6 +4324,7 @@ mockedApiResponse.Schema = { "per_page": { "description": "Maximum number of items to be returned in result set.", "type": "integer", + "default": 10, "minimum": 1, "maximum": 100, "required": false @@ -4139,6 +4334,30 @@ mockedApiResponse.Schema = { "type": "string", "required": false }, + "after": { + "description": "Limit response to posts published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_after": { + "description": "Limit response to posts modified after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to posts published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_before": { + "description": "Limit response to posts modified before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, "exclude": { "description": "Ensure result set excludes specific IDs.", "type": "array", @@ -4173,110 +4392,153 @@ mockedApiResponse.Schema = { "required": false }, "orderby": { - "description": "Sort collection by object attribute.", + "description": "Sort collection by post attribute.", "type": "string", "default": "date", "enum": [ + "author", "date", "id", "include", + "modified", + "parent", "relevance", "slug", "include_slugs", "title" ], "required": false - } - } - } - ] - }, - "/wp/v2/blocks/(?P[\\d]+)/revisions/(?P[\\d]+)": { - "namespace": "wp/v2", - "methods": [ - "GET", - "DELETE" - ], - "endpoints": [ - { - "methods": [ - "GET" - ], - "args": { - "parent": { - "description": "The ID for the parent of the revision.", - "type": "integer", + }, + "search_columns": { + "default": [], + "description": "Array of column names to be searched.", + "type": "array", + "items": { + "enum": [ + "post_title", + "post_content", + "post_excerpt" + ], + "type": "string" + }, "required": false }, - "id": { - "description": "Unique identifier for the revision.", - "type": "integer", + "slug": { + "description": "Limit result set to posts with one or more specific slugs.", + "type": "array", + "items": { + "type": "string" + }, "required": false }, - "context": { - "description": "Scope under which the request is made; determines fields present in response.", + "status": { + "default": "publish", + "description": "Limit result set to posts assigned one or more statuses.", + "type": "array", + "items": { + "enum": [ + "publish", + "future", + "draft", + "pending", + "private", + "trash", + "auto-draft", + "inherit", + "request-pending", + "request-confirmed", + "request-failed", + "request-completed", + "any" + ], + "type": "string" + }, + "required": false + }, + "tax_relation": { + "description": "Limit result set based on relationship between multiple taxonomies.", "type": "string", "enum": [ - "view", - "embed", - "edit" + "AND", + "OR" ], - "default": "view", - "required": false - } - } - }, - { - "methods": [ - "DELETE" - ], - "args": { - "parent": { - "description": "The ID for the parent of the revision.", - "type": "integer", - "required": false - }, - "id": { - "description": "Unique identifier for the revision.", - "type": "integer", "required": false }, - "force": { - "type": "boolean", - "default": false, - "description": "Required to be true, as revisions do not support trashing.", - "required": false - } - } - } - ] - }, - "/wp/v2/blocks/(?P[\\d]+)/autosaves": { - "namespace": "wp/v2", - "methods": [ - "GET", - "POST" - ], - "endpoints": [ - { - "methods": [ - "GET" - ], - "args": { - "parent": { - "description": "The ID for the parent of the autosave.", - "type": "integer", + "wp_pattern_category": { + "description": "Limit result set to items with specific terms assigned in the wp_pattern_category taxonomy.", + "type": [ + "object", + "array" + ], + "oneOf": [ + { + "title": "Term ID List", + "description": "Match terms with the listed IDs.", + "type": "array", + "items": { + "type": "integer" + } + }, + { + "title": "Term ID Taxonomy Query", + "description": "Perform an advanced term query.", + "type": "object", + "properties": { + "terms": { + "description": "Term IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [] + }, + "operator": { + "description": "Whether items must be assigned all or any of the specified terms.", + "type": "string", + "enum": [ + "AND", + "OR" + ], + "default": "OR" + } + }, + "additionalProperties": false + } + ], "required": false }, - "context": { - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string", - "enum": [ - "view", - "embed", - "edit" + "wp_pattern_category_exclude": { + "description": "Limit result set to items except those with specific terms assigned in the wp_pattern_category taxonomy.", + "type": [ + "object", + "array" + ], + "oneOf": [ + { + "title": "Term ID List", + "description": "Match terms with the listed IDs.", + "type": "array", + "items": { + "type": "integer" + } + }, + { + "title": "Term ID Taxonomy Query", + "description": "Perform an advanced term query.", + "type": "object", + "properties": { + "terms": { + "description": "Term IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [] + } + }, + "additionalProperties": false + } ], - "default": "view", "required": false } } @@ -4285,12 +4547,10 @@ mockedApiResponse.Schema = { "methods": [ "POST" ], + "allow_batch": { + "v1": true + }, "args": { - "parent": { - "description": "The ID for the parent of the autosave.", - "type": "integer", - "required": false - }, "date": { "description": "The date the post was published, in the site's timezone.", "type": [ @@ -4400,146 +4660,18 @@ mockedApiResponse.Schema = { } } } - ] - }, - "/wp/v2/blocks/(?P[\\d]+)/autosaves/(?P[\\d]+)": { - "namespace": "wp/v2", - "methods": [ - "GET" - ], - "endpoints": [ - { - "methods": [ - "GET" - ], - "args": { - "parent": { - "description": "The ID for the parent of the autosave.", - "type": "integer", - "required": false - }, - "id": { - "description": "The ID for the autosave.", - "type": "integer", - "required": false - }, - "context": { - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string", - "enum": [ - "view", - "embed", - "edit" - ], - "default": "view", - "required": false - } - } - } - ] - }, - "/wp/v2/templates/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions": { - "namespace": "wp/v2", - "methods": [ - "GET" ], - "endpoints": [ - { - "methods": [ - "GET" - ], - "args": { - "parent": { - "description": "The id of a template", - "type": "string", - "required": false - }, - "context": { - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string", - "enum": [ - "view", - "embed", - "edit" - ], - "default": "view", - "required": false - }, - "page": { - "description": "Current page of the collection.", - "type": "integer", - "default": 1, - "minimum": 1, - "required": false - }, - "per_page": { - "description": "Maximum number of items to be returned in result set.", - "type": "integer", - "minimum": 1, - "maximum": 100, - "required": false - }, - "search": { - "description": "Limit results to those matching a string.", - "type": "string", - "required": false - }, - "exclude": { - "description": "Ensure result set excludes specific IDs.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [], - "required": false - }, - "include": { - "description": "Limit result set to specific IDs.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [], - "required": false - }, - "offset": { - "description": "Offset the result set by a specific number of items.", - "type": "integer", - "required": false - }, - "order": { - "description": "Order sort attribute ascending or descending.", - "type": "string", - "default": "desc", - "enum": [ - "asc", - "desc" - ], - "required": false - }, - "orderby": { - "description": "Sort collection by object attribute.", - "type": "string", - "default": "date", - "enum": [ - "date", - "id", - "include", - "relevance", - "slug", - "include_slugs", - "title" - ], - "required": false - } - } - } - ] + "_links": { + "self": "http://example.org/index.php?rest_route=/wp/v2/blocks" + } }, - "/wp/v2/templates/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions/(?P[\\d]+)": { + "/wp/v2/blocks/(?P[\\d]+)": { "namespace": "wp/v2", "methods": [ "GET", + "POST", + "PUT", + "PATCH", "DELETE" ], "endpoints": [ @@ -4547,14 +4679,12 @@ mockedApiResponse.Schema = { "methods": [ "GET" ], + "allow_batch": { + "v1": true + }, "args": { - "parent": { - "description": "The id of a template", - "type": "string", - "required": false - }, "id": { - "description": "Unique identifier for the revision.", + "description": "Unique identifier for the post.", "type": "integer", "required": false }, @@ -4568,136 +4698,107 @@ mockedApiResponse.Schema = { ], "default": "view", "required": false + }, + "password": { + "description": "The password for the post if it is password protected.", + "type": "string", + "required": false } } }, { "methods": [ - "DELETE" + "POST", + "PUT", + "PATCH" ], + "allow_batch": { + "v1": true + }, "args": { - "parent": { - "description": "The id of a template", - "type": "string", - "required": false - }, "id": { - "description": "Unique identifier for the revision.", + "description": "Unique identifier for the post.", "type": "integer", "required": false }, - "force": { - "type": "boolean", - "default": false, - "description": "Required to be true, as revisions do not support trashing.", - "required": false - } - } - } - ] - }, - "/wp/v2/templates/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves": { - "namespace": "wp/v2", - "methods": [ - "GET", - "POST" - ], - "endpoints": [ - { - "methods": [ - "GET" - ], - "args": { - "id": { - "description": "The id of a template", - "type": "string", + "date": { + "description": "The date the post was published, in the site's timezone.", + "type": [ + "string", + "null" + ], + "format": "date-time", "required": false }, - "context": { - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string", - "enum": [ - "view", - "embed", - "edit" + "date_gmt": { + "description": "The date the post was published, as GMT.", + "type": [ + "string", + "null" ], - "default": "view", - "required": false - } - } - }, - { - "methods": [ - "POST" - ], - "args": { - "id": { - "description": "The id of a template", - "type": "string", + "format": "date-time", "required": false }, "slug": { - "description": "Unique slug identifying the template.", + "description": "An alphanumeric identifier for the post unique to its type.", "type": "string", - "minLength": 1, - "pattern": "[a-zA-Z0-9_\\%-]+", "required": false }, - "theme": { - "description": "Theme identifier for the template.", + "status": { + "description": "A named status for the post.", "type": "string", + "enum": [ + "publish", + "future", + "draft", + "pending", + "private" + ], "required": false }, - "type": { - "description": "Type of template.", + "password": { + "description": "A password to protect access to the content and excerpt.", "type": "string", "required": false }, - "content": { - "description": "Content of template.", - "type": [ - "object", - "string" - ], + "title": { + "description": "The title for the post.", + "type": "object", "properties": { "raw": { - "description": "Content for the template, as it exists in the database.", + "description": "Title for the post, as it exists in the database.", "type": "string", "context": [ "view", "edit" ] - }, - "block_version": { - "description": "Version of the content block format used by the template.", - "type": "integer", - "context": [ - "edit" - ], - "readonly": true } }, "required": false }, - "title": { - "description": "Title of template.", - "type": [ - "object", - "string" - ], + "content": { + "description": "The content for the post.", + "type": "object", "properties": { "raw": { - "description": "Title for the template, as it exists in the database.", + "description": "Content for the post, as it exists in the database.", "type": "string", "context": [ "view", - "edit", - "embed" + "edit" ] }, - "rendered": { - "description": "HTML title for the template, transformed for display.", - "type": "string", + "block_version": { + "description": "Version of the content block format used by the post.", + "type": "integer", + "context": [ + "edit" + ], + "readonly": true + }, + "protected": { + "description": "Whether the content is protected with a password.", + "type": "boolean", "context": [ "view", "edit", @@ -4708,73 +4809,54 @@ mockedApiResponse.Schema = { }, "required": false }, - "description": { - "description": "Description of template.", - "type": "string", + "meta": { + "description": "Meta fields.", + "type": "object", + "properties": [], "required": false }, - "status": { - "description": "Status of template.", + "template": { + "description": "The theme file to use to display the post.", "type": "string", - "enum": [ - "publish", - "future", - "draft", - "pending", - "private" - ], "required": false }, - "author": { - "description": "The ID for the author of the template.", - "type": "integer", + "wp_pattern_category": { + "description": "The terms assigned to the post in the wp_pattern_category taxonomy.", + "type": "array", + "items": { + "type": "integer" + }, "required": false } } - } - ] - }, - "/wp/v2/templates/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves/(?P[\\d]+)": { - "namespace": "wp/v2", - "methods": [ - "GET" - ], - "endpoints": [ + }, { "methods": [ - "GET" + "DELETE" ], + "allow_batch": { + "v1": true + }, "args": { - "parent": { - "description": "The id of a template", - "type": "string", - "required": false - }, "id": { - "description": "The ID for the autosave.", + "description": "Unique identifier for the post.", "type": "integer", "required": false }, - "context": { - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string", - "enum": [ - "view", - "embed", - "edit" - ], - "default": "view", + "force": { + "type": "boolean", + "default": false, + "description": "Whether to bypass Trash and force deletion.", "required": false } } } ] }, - "/wp/v2/templates": { + "/wp/v2/blocks/(?P[\\d]+)/revisions": { "namespace": "wp/v2", "methods": [ - "GET", - "POST" + "GET" ], "endpoints": [ { @@ -4782,6 +4864,11 @@ mockedApiResponse.Schema = { "GET" ], "args": { + "parent": { + "description": "The ID for the parent of the revision.", + "type": "integer", + "required": false + }, "context": { "description": "Scope under which the request is made; determines fields present in response.", "type": "string", @@ -4793,141 +4880,82 @@ mockedApiResponse.Schema = { "default": "view", "required": false }, - "wp_id": { - "description": "Limit to the specified post id.", + "page": { + "description": "Current page of the collection.", "type": "integer", + "default": 1, + "minimum": 1, "required": false }, - "area": { - "description": "Limit to the specified template part area.", - "type": "string", - "required": false - }, - "post_type": { - "description": "Post type to get the templates for.", - "type": "string", - "required": false - } - } - }, - { - "methods": [ - "POST" - ], - "args": { - "slug": { - "description": "Unique slug identifying the template.", - "type": "string", - "minLength": 1, - "pattern": "[a-zA-Z0-9_\\%-]+", - "required": true - }, - "theme": { - "description": "Theme identifier for the template.", - "type": "string", + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "minimum": 1, + "maximum": 100, "required": false }, - "type": { - "description": "Type of template.", + "search": { + "description": "Limit results to those matching a string.", "type": "string", "required": false }, - "content": { - "default": "", - "description": "Content of template.", - "type": [ - "object", - "string" - ], - "properties": { - "raw": { - "description": "Content for the template, as it exists in the database.", - "type": "string", - "context": [ - "view", - "edit" - ] - }, - "block_version": { - "description": "Version of the content block format used by the template.", - "type": "integer", - "context": [ - "edit" - ], - "readonly": true - } + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" }, + "default": [], "required": false }, - "title": { - "default": "", - "description": "Title of template.", - "type": [ - "object", - "string" - ], - "properties": { - "raw": { - "description": "Title for the template, as it exists in the database.", - "type": "string", - "context": [ - "view", - "edit", - "embed" - ] - }, - "rendered": { - "description": "HTML title for the template, transformed for display.", - "type": "string", - "context": [ - "view", - "edit", - "embed" - ], - "readonly": true - } + "include": { + "description": "Limit result set to specific IDs.", + "type": "array", + "items": { + "type": "integer" }, + "default": [], "required": false }, - "description": { - "default": "", - "description": "Description of template.", - "type": "string", + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", "required": false }, - "status": { - "default": "publish", - "description": "Status of template.", + "order": { + "description": "Order sort attribute ascending or descending.", "type": "string", + "default": "desc", "enum": [ - "publish", - "future", - "draft", - "pending", - "private" + "asc", + "desc" ], "required": false }, - "author": { - "description": "The ID for the author of the template.", - "type": "integer", + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "id", + "include", + "relevance", + "slug", + "include_slugs", + "title" + ], "required": false } } } - ], - "_links": { - "self": [ - { - "href": "http://example.org/index.php?rest_route=/wp/v2/templates" - } - ] - } + ] }, - "/wp/v2/templates/lookup": { + "/wp/v2/blocks/(?P[\\d]+)/revisions/(?P[\\d]+)": { "namespace": "wp/v2", "methods": [ - "GET" + "GET", + "DELETE" ], "endpoints": [ { @@ -4935,40 +4963,59 @@ mockedApiResponse.Schema = { "GET" ], "args": { - "slug": { - "description": "The slug of the template to get the fallback for", - "type": "string", - "required": true + "parent": { + "description": "The ID for the parent of the revision.", + "type": "integer", + "required": false }, - "is_custom": { - "description": "Indicates if a template is custom or part of the template hierarchy", - "type": "boolean", + "id": { + "description": "Unique identifier for the revision.", + "type": "integer", "required": false }, - "template_prefix": { - "description": "The template prefix for the created template. This is used to extract the main template type, e.g. in `taxonomy-books` extracts the `taxonomy`", + "context": { + "description": "Scope under which the request is made; determines fields present in response.", "type": "string", + "enum": [ + "view", + "embed", + "edit" + ], + "default": "view", "required": false } } - } - ], - "_links": { - "self": [ - { - "href": "http://example.org/index.php?rest_route=/wp/v2/templates/lookup" + }, + { + "methods": [ + "DELETE" + ], + "args": { + "parent": { + "description": "The ID for the parent of the revision.", + "type": "integer", + "required": false + }, + "id": { + "description": "Unique identifier for the revision.", + "type": "integer", + "required": false + }, + "force": { + "type": "boolean", + "default": false, + "description": "Required to be true, as revisions do not support trashing.", + "required": false + } } - ] - } + } + ] }, - "/wp/v2/templates/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": { + "/wp/v2/blocks/(?P[\\d]+)/autosaves": { "namespace": "wp/v2", "methods": [ "GET", - "POST", - "PUT", - "PATCH", - "DELETE" + "POST" ], "endpoints": [ { @@ -4976,9 +5023,9 @@ mockedApiResponse.Schema = { "GET" ], "args": { - "id": { - "description": "The id of a template", - "type": "string", + "parent": { + "description": "The ID for the parent of the autosave.", + "type": "integer", "required": false }, "context": { @@ -4996,78 +5043,92 @@ mockedApiResponse.Schema = { }, { "methods": [ - "POST", - "PUT", - "PATCH" + "POST" ], "args": { - "id": { - "description": "The id of a template", - "type": "string", + "parent": { + "description": "The ID for the parent of the autosave.", + "type": "integer", + "required": false + }, + "date": { + "description": "The date the post was published, in the site's timezone.", + "type": [ + "string", + "null" + ], + "format": "date-time", + "required": false + }, + "date_gmt": { + "description": "The date the post was published, as GMT.", + "type": [ + "string", + "null" + ], + "format": "date-time", "required": false }, "slug": { - "description": "Unique slug identifying the template.", + "description": "An alphanumeric identifier for the post unique to its type.", "type": "string", - "minLength": 1, - "pattern": "[a-zA-Z0-9_\\%-]+", "required": false }, - "theme": { - "description": "Theme identifier for the template.", + "status": { + "description": "A named status for the post.", "type": "string", + "enum": [ + "publish", + "future", + "draft", + "pending", + "private" + ], "required": false }, - "type": { - "description": "Type of template.", + "password": { + "description": "A password to protect access to the content and excerpt.", "type": "string", "required": false }, - "content": { - "description": "Content of template.", - "type": [ - "object", - "string" - ], + "title": { + "description": "The title for the post.", + "type": "object", "properties": { "raw": { - "description": "Content for the template, as it exists in the database.", + "description": "Title for the post, as it exists in the database.", "type": "string", "context": [ "view", "edit" ] - }, - "block_version": { - "description": "Version of the content block format used by the template.", - "type": "integer", - "context": [ - "edit" - ], - "readonly": true } }, "required": false }, - "title": { - "description": "Title of template.", - "type": [ - "object", - "string" - ], + "content": { + "description": "The content for the post.", + "type": "object", "properties": { "raw": { - "description": "Title for the template, as it exists in the database.", + "description": "Content for the post, as it exists in the database.", "type": "string", "context": [ "view", - "edit", - "embed" + "edit" ] }, - "rendered": { - "description": "HTML title for the template, transformed for display.", - "type": "string", + "block_version": { + "description": "Version of the content block format used by the post.", + "type": "integer", + "context": [ + "edit" + ], + "readonly": true + }, + "protected": { + "description": "Whether the content is protected with a password.", + "type": "boolean", "context": [ "view", "edit", @@ -5078,51 +5139,66 @@ mockedApiResponse.Schema = { }, "required": false }, - "description": { - "description": "Description of template.", - "type": "string", + "meta": { + "description": "Meta fields.", + "type": "object", + "properties": [], "required": false }, - "status": { - "description": "Status of template.", + "template": { + "description": "The theme file to use to display the post.", "type": "string", - "enum": [ - "publish", - "future", - "draft", - "pending", - "private" - ], "required": false }, - "author": { - "description": "The ID for the author of the template.", - "type": "integer", + "wp_pattern_category": { + "description": "The terms assigned to the post in the wp_pattern_category taxonomy.", + "type": "array", + "items": { + "type": "integer" + }, "required": false } } - }, + } + ] + }, + "/wp/v2/blocks/(?P[\\d]+)/autosaves/(?P[\\d]+)": { + "namespace": "wp/v2", + "methods": [ + "GET" + ], + "endpoints": [ { "methods": [ - "DELETE" + "GET" ], "args": { + "parent": { + "description": "The ID for the parent of the autosave.", + "type": "integer", + "required": false + }, "id": { - "description": "The id of a template", - "type": "string", + "description": "The ID for the autosave.", + "type": "integer", "required": false }, - "force": { - "type": "boolean", - "default": false, - "description": "Whether to bypass Trash and force deletion.", + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "embed", + "edit" + ], + "default": "view", "required": false } } } ] }, - "/wp/v2/template-parts/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions": { + "/wp/v2/templates/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions": { "namespace": "wp/v2", "methods": [ "GET" @@ -5220,7 +5296,7 @@ mockedApiResponse.Schema = { } ] }, - "/wp/v2/template-parts/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions/(?P[\\d]+)": { + "/wp/v2/templates/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions/(?P[\\d]+)": { "namespace": "wp/v2", "methods": [ "GET", @@ -5280,7 +5356,7 @@ mockedApiResponse.Schema = { } ] }, - "/wp/v2/template-parts/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves": { + "/wp/v2/templates/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves": { "namespace": "wp/v2", "methods": [ "GET", @@ -5413,17 +5489,12 @@ mockedApiResponse.Schema = { "description": "The ID for the author of the template.", "type": "integer", "required": false - }, - "area": { - "description": "Where the template part is intended for use (header, footer, etc.)", - "type": "string", - "required": false } } } ] }, - "/wp/v2/template-parts/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves/(?P[\\d]+)": { + "/wp/v2/templates/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves/(?P[\\d]+)": { "namespace": "wp/v2", "methods": [ "GET" @@ -5459,7 +5530,7 @@ mockedApiResponse.Schema = { } ] }, - "/wp/v2/template-parts": { + "/wp/v2/templates": { "namespace": "wp/v2", "methods": [ "GET", @@ -5601,11 +5672,6 @@ mockedApiResponse.Schema = { "description": "The ID for the author of the template.", "type": "integer", "required": false - }, - "area": { - "description": "Where the template part is intended for use (header, footer, etc.)", - "type": "string", - "required": false } } } @@ -5613,12 +5679,12 @@ mockedApiResponse.Schema = { "_links": { "self": [ { - "href": "http://example.org/index.php?rest_route=/wp/v2/template-parts" + "href": "http://example.org/index.php?rest_route=/wp/v2/templates" } ] } }, - "/wp/v2/template-parts/lookup": { + "/wp/v2/templates/lookup": { "namespace": "wp/v2", "methods": [ "GET" @@ -5650,12 +5716,12 @@ mockedApiResponse.Schema = { "_links": { "self": [ { - "href": "http://example.org/index.php?rest_route=/wp/v2/template-parts/lookup" + "href": "http://example.org/index.php?rest_route=/wp/v2/templates/lookup" } ] } }, - "/wp/v2/template-parts/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": { + "/wp/v2/templates/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": { "namespace": "wp/v2", "methods": [ "GET", @@ -5793,11 +5859,6 @@ mockedApiResponse.Schema = { "description": "The ID for the author of the template.", "type": "integer", "required": false - }, - "area": { - "description": "Where the template part is intended for use (header, footer, etc.)", - "type": "string", - "required": false } } }, @@ -5821,21 +5882,22 @@ mockedApiResponse.Schema = { } ] }, - "/wp/v2/navigation": { + "/wp/v2/template-parts/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions": { "namespace": "wp/v2", "methods": [ - "GET", - "POST" + "GET" ], "endpoints": [ { "methods": [ "GET" ], - "allow_batch": { - "v1": true - }, "args": { + "parent": { + "description": "The id of a template", + "type": "string", + "required": false + }, "context": { "description": "Scope under which the request is made; determines fields present in response.", "type": "string", @@ -5857,7 +5919,6 @@ mockedApiResponse.Schema = { "per_page": { "description": "Maximum number of items to be returned in result set.", "type": "integer", - "default": 10, "minimum": 1, "maximum": 100, "required": false @@ -5867,30 +5928,6 @@ mockedApiResponse.Schema = { "type": "string", "required": false }, - "after": { - "description": "Limit response to posts published after a given ISO8601 compliant date.", - "type": "string", - "format": "date-time", - "required": false - }, - "modified_after": { - "description": "Limit response to posts modified after a given ISO8601 compliant date.", - "type": "string", - "format": "date-time", - "required": false - }, - "before": { - "description": "Limit response to posts published before a given ISO8601 compliant date.", - "type": "string", - "format": "date-time", - "required": false - }, - "modified_before": { - "description": "Limit response to posts modified before a given ISO8601 compliant date.", - "type": "string", - "format": "date-time", - "required": false - }, "exclude": { "description": "Ensure result set excludes specific IDs.", "type": "array", @@ -5925,225 +5962,99 @@ mockedApiResponse.Schema = { "required": false }, "orderby": { - "description": "Sort collection by post attribute.", + "description": "Sort collection by object attribute.", "type": "string", "default": "date", "enum": [ - "author", "date", "id", "include", - "modified", - "parent", "relevance", "slug", "include_slugs", "title" ], "required": false - }, - "search_columns": { - "default": [], - "description": "Array of column names to be searched.", - "type": "array", - "items": { - "enum": [ - "post_title", - "post_content", - "post_excerpt" - ], - "type": "string" - }, - "required": false - }, - "slug": { - "description": "Limit result set to posts with one or more specific slugs.", - "type": "array", - "items": { - "type": "string" - }, - "required": false - }, - "status": { - "default": "publish", - "description": "Limit result set to posts assigned one or more statuses.", - "type": "array", - "items": { - "enum": [ - "publish", - "future", - "draft", - "pending", - "private", - "trash", - "auto-draft", - "inherit", - "request-pending", - "request-confirmed", - "request-failed", - "request-completed", - "any" - ], - "type": "string" - }, - "required": false } } - }, + } + ] + }, + "/wp/v2/template-parts/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions/(?P[\\d]+)": { + "namespace": "wp/v2", + "methods": [ + "GET", + "DELETE" + ], + "endpoints": [ { "methods": [ - "POST" + "GET" ], - "allow_batch": { - "v1": true - }, "args": { - "date": { - "description": "The date the post was published, in the site's timezone.", - "type": [ - "string", - "null" - ], - "format": "date-time", - "required": false - }, - "date_gmt": { - "description": "The date the post was published, as GMT.", - "type": [ - "string", - "null" - ], - "format": "date-time", + "parent": { + "description": "The id of a template", + "type": "string", "required": false }, - "slug": { - "description": "An alphanumeric identifier for the post unique to its type.", - "type": "string", + "id": { + "description": "Unique identifier for the revision.", + "type": "integer", "required": false }, - "status": { - "description": "A named status for the post.", + "context": { + "description": "Scope under which the request is made; determines fields present in response.", "type": "string", "enum": [ - "publish", - "future", - "draft", - "pending", - "private" + "view", + "embed", + "edit" ], + "default": "view", "required": false - }, - "password": { - "description": "A password to protect access to the content and excerpt.", + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "parent": { + "description": "The id of a template", "type": "string", "required": false }, - "title": { - "description": "The title for the post.", - "type": "object", - "properties": { - "raw": { - "description": "Title for the post, as it exists in the database.", - "type": "string", - "context": [ - "edit", - "embed" - ] - }, - "rendered": { - "description": "HTML title for the post, transformed for display.", - "type": "string", - "context": [ - "view", - "edit", - "embed" - ], - "readonly": true - } - }, - "required": false - }, - "content": { - "description": "The content for the post.", - "type": "object", - "properties": { - "raw": { - "description": "Content for the post, as it exists in the database.", - "type": "string", - "context": [ - "edit", - "embed" - ] - }, - "rendered": { - "description": "HTML content for the post, transformed for display.", - "type": "string", - "context": [ - "view", - "edit", - "embed" - ], - "readonly": true - }, - "block_version": { - "description": "Version of the content block format used by the post.", - "type": "integer", - "context": [ - "edit", - "embed" - ], - "readonly": true - }, - "protected": { - "description": "Whether the content is protected with a password.", - "type": "boolean", - "context": [ - "view", - "edit", - "embed" - ], - "readonly": true - } - }, - "required": false - }, - "template": { - "description": "The theme file to use to display the post.", - "type": "string", + "id": { + "description": "Unique identifier for the revision.", + "type": "integer", + "required": false + }, + "force": { + "type": "boolean", + "default": false, + "description": "Required to be true, as revisions do not support trashing.", "required": false } } } - ], - "_links": { - "self": [ - { - "href": "http://example.org/index.php?rest_route=/wp/v2/navigation" - } - ] - } + ] }, - "/wp/v2/navigation/(?P[\\d]+)": { + "/wp/v2/template-parts/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves": { "namespace": "wp/v2", "methods": [ "GET", - "POST", - "PUT", - "PATCH", - "DELETE" + "POST" ], "endpoints": [ { "methods": [ "GET" ], - "allow_batch": { - "v1": true - }, "args": { "id": { - "description": "Unique identifier for the post.", - "type": "integer", + "description": "The id of a template", + "type": "string", "required": false }, "context": { @@ -6156,108 +6067,80 @@ mockedApiResponse.Schema = { ], "default": "view", "required": false - }, - "password": { - "description": "The password for the post if it is password protected.", - "type": "string", - "required": false } } }, { "methods": [ - "POST", - "PUT", - "PATCH" + "POST" ], - "allow_batch": { - "v1": true - }, "args": { "id": { - "description": "Unique identifier for the post.", - "type": "integer", - "required": false - }, - "date": { - "description": "The date the post was published, in the site's timezone.", - "type": [ - "string", - "null" - ], - "format": "date-time", - "required": false - }, - "date_gmt": { - "description": "The date the post was published, as GMT.", - "type": [ - "string", - "null" - ], - "format": "date-time", + "description": "The id of a template", + "type": "string", "required": false }, "slug": { - "description": "An alphanumeric identifier for the post unique to its type.", + "description": "Unique slug identifying the template.", "type": "string", + "minLength": 1, + "pattern": "[a-zA-Z0-9_\\%-]+", "required": false }, - "status": { - "description": "A named status for the post.", + "theme": { + "description": "Theme identifier for the template.", "type": "string", - "enum": [ - "publish", - "future", - "draft", - "pending", - "private" - ], "required": false }, - "password": { - "description": "A password to protect access to the content and excerpt.", + "type": { + "description": "Type of template.", "type": "string", "required": false }, - "title": { - "description": "The title for the post.", - "type": "object", + "content": { + "description": "Content of template.", + "type": [ + "object", + "string" + ], "properties": { "raw": { - "description": "Title for the post, as it exists in the database.", + "description": "Content for the template, as it exists in the database.", "type": "string", "context": [ - "edit", - "embed" + "view", + "edit" ] }, - "rendered": { - "description": "HTML title for the post, transformed for display.", - "type": "string", + "block_version": { + "description": "Version of the content block format used by the template.", + "type": "integer", "context": [ - "view", - "edit", - "embed" + "edit" ], "readonly": true } }, "required": false }, - "content": { - "description": "The content for the post.", - "type": "object", + "title": { + "description": "Title of template.", + "type": [ + "object", + "string" + ], "properties": { "raw": { - "description": "Content for the post, as it exists in the database.", + "description": "Title for the template, as it exists in the database.", "type": "string", "context": [ + "view", "edit", "embed" ] }, "rendered": { - "description": "HTML content for the post, transformed for display.", + "description": "HTML title for the template, transformed for display.", "type": "string", "context": [ "view", @@ -6265,63 +6148,82 @@ mockedApiResponse.Schema = { "embed" ], "readonly": true - }, - "block_version": { - "description": "Version of the content block format used by the post.", - "type": "integer", - "context": [ - "edit", - "embed" - ], - "readonly": true - }, - "protected": { - "description": "Whether the content is protected with a password.", - "type": "boolean", - "context": [ - "view", - "edit", - "embed" - ], - "readonly": true } }, "required": false }, - "template": { - "description": "The theme file to use to display the post.", + "description": { + "description": "Description of template.", + "type": "string", + "required": false + }, + "status": { + "description": "Status of template.", + "type": "string", + "enum": [ + "publish", + "future", + "draft", + "pending", + "private" + ], + "required": false + }, + "author": { + "description": "The ID for the author of the template.", + "type": "integer", + "required": false + }, + "area": { + "description": "Where the template part is intended for use (header, footer, etc.)", "type": "string", "required": false } } - }, + } + ] + }, + "/wp/v2/template-parts/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves/(?P[\\d]+)": { + "namespace": "wp/v2", + "methods": [ + "GET" + ], + "endpoints": [ { "methods": [ - "DELETE" + "GET" ], - "allow_batch": { - "v1": true - }, "args": { + "parent": { + "description": "The id of a template", + "type": "string", + "required": false + }, "id": { - "description": "Unique identifier for the post.", + "description": "The ID for the autosave.", "type": "integer", "required": false }, - "force": { - "type": "boolean", - "default": false, - "description": "Whether to bypass Trash and force deletion.", + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "embed", + "edit" + ], + "default": "view", "required": false } } } ] }, - "/wp/v2/navigation/(?P[\\d]+)/revisions": { + "/wp/v2/template-parts": { "namespace": "wp/v2", "methods": [ - "GET" + "GET", + "POST" ], "endpoints": [ { @@ -6329,11 +6231,6 @@ mockedApiResponse.Schema = { "GET" ], "args": { - "parent": { - "description": "The ID for the parent of the revision.", - "type": "integer", - "required": false - }, "context": { "description": "Scope under which the request is made; determines fields present in response.", "type": "string", @@ -6345,82 +6242,146 @@ mockedApiResponse.Schema = { "default": "view", "required": false }, - "page": { - "description": "Current page of the collection.", + "wp_id": { + "description": "Limit to the specified post id.", "type": "integer", - "default": 1, - "minimum": 1, "required": false }, - "per_page": { - "description": "Maximum number of items to be returned in result set.", - "type": "integer", - "minimum": 1, - "maximum": 100, + "area": { + "description": "Limit to the specified template part area.", + "type": "string", "required": false }, - "search": { - "description": "Limit results to those matching a string.", + "post_type": { + "description": "Post type to get the templates for.", + "type": "string", + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "slug": { + "description": "Unique slug identifying the template.", + "type": "string", + "minLength": 1, + "pattern": "[a-zA-Z0-9_\\%-]+", + "required": true + }, + "theme": { + "description": "Theme identifier for the template.", + "type": "string", + "required": false + }, + "type": { + "description": "Type of template.", "type": "string", "required": false }, - "exclude": { - "description": "Ensure result set excludes specific IDs.", - "type": "array", - "items": { - "type": "integer" + "content": { + "default": "", + "description": "Content of template.", + "type": [ + "object", + "string" + ], + "properties": { + "raw": { + "description": "Content for the template, as it exists in the database.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "block_version": { + "description": "Version of the content block format used by the template.", + "type": "integer", + "context": [ + "edit" + ], + "readonly": true + } }, - "default": [], "required": false }, - "include": { - "description": "Limit result set to specific IDs.", - "type": "array", - "items": { - "type": "integer" + "title": { + "default": "", + "description": "Title of template.", + "type": [ + "object", + "string" + ], + "properties": { + "raw": { + "description": "Title for the template, as it exists in the database.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ] + }, + "rendered": { + "description": "HTML title for the template, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } }, - "default": [], "required": false }, - "offset": { - "description": "Offset the result set by a specific number of items.", - "type": "integer", + "description": { + "default": "", + "description": "Description of template.", + "type": "string", "required": false }, - "order": { - "description": "Order sort attribute ascending or descending.", + "status": { + "default": "publish", + "description": "Status of template.", "type": "string", - "default": "desc", "enum": [ - "asc", - "desc" + "publish", + "future", + "draft", + "pending", + "private" ], "required": false }, - "orderby": { - "description": "Sort collection by object attribute.", + "author": { + "description": "The ID for the author of the template.", + "type": "integer", + "required": false + }, + "area": { + "description": "Where the template part is intended for use (header, footer, etc.)", "type": "string", - "default": "date", - "enum": [ - "date", - "id", - "include", - "relevance", - "slug", - "include_slugs", - "title" - ], "required": false } } } - ] + ], + "_links": { + "self": [ + { + "href": "http://example.org/index.php?rest_route=/wp/v2/template-parts" + } + ] + } }, - "/wp/v2/navigation/(?P[\\d]+)/revisions/(?P[\\d]+)": { + "/wp/v2/template-parts/lookup": { "namespace": "wp/v2", "methods": [ - "GET", - "DELETE" + "GET" ], "endpoints": [ { @@ -6428,59 +6389,40 @@ mockedApiResponse.Schema = { "GET" ], "args": { - "parent": { - "description": "The ID for the parent of the revision.", - "type": "integer", - "required": false - }, - "id": { - "description": "Unique identifier for the revision.", - "type": "integer", - "required": false - }, - "context": { - "description": "Scope under which the request is made; determines fields present in response.", + "slug": { + "description": "The slug of the template to get the fallback for", "type": "string", - "enum": [ - "view", - "embed", - "edit" - ], - "default": "view", - "required": false - } - } - }, - { - "methods": [ - "DELETE" - ], - "args": { - "parent": { - "description": "The ID for the parent of the revision.", - "type": "integer", - "required": false + "required": true }, - "id": { - "description": "Unique identifier for the revision.", - "type": "integer", + "is_custom": { + "description": "Indicates if a template is custom or part of the template hierarchy", + "type": "boolean", "required": false }, - "force": { - "type": "boolean", - "default": false, - "description": "Required to be true, as revisions do not support trashing.", + "template_prefix": { + "description": "The template prefix for the created template. This is used to extract the main template type, e.g. in `taxonomy-books` extracts the `taxonomy`", + "type": "string", "required": false } } } - ] + ], + "_links": { + "self": [ + { + "href": "http://example.org/index.php?rest_route=/wp/v2/template-parts/lookup" + } + ] + } }, - "/wp/v2/navigation/(?P[\\d]+)/autosaves": { + "/wp/v2/template-parts/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": { "namespace": "wp/v2", "methods": [ "GET", - "POST" + "POST", + "PUT", + "PATCH", + "DELETE" ], "endpoints": [ { @@ -6488,9 +6430,9 @@ mockedApiResponse.Schema = { "GET" ], "args": { - "parent": { - "description": "The ID for the parent of the autosave.", - "type": "integer", + "id": { + "description": "The id of a template", + "type": "string", "required": false }, "context": { @@ -6508,93 +6450,77 @@ mockedApiResponse.Schema = { }, { "methods": [ - "POST" + "POST", + "PUT", + "PATCH" ], "args": { - "parent": { - "description": "The ID for the parent of the autosave.", - "type": "integer", - "required": false - }, - "date": { - "description": "The date the post was published, in the site's timezone.", - "type": [ - "string", - "null" - ], - "format": "date-time", - "required": false - }, - "date_gmt": { - "description": "The date the post was published, as GMT.", - "type": [ - "string", - "null" - ], - "format": "date-time", + "id": { + "description": "The id of a template", + "type": "string", "required": false }, "slug": { - "description": "An alphanumeric identifier for the post unique to its type.", + "description": "Unique slug identifying the template.", "type": "string", + "minLength": 1, + "pattern": "[a-zA-Z0-9_\\%-]+", "required": false }, - "status": { - "description": "A named status for the post.", + "theme": { + "description": "Theme identifier for the template.", "type": "string", - "enum": [ - "publish", - "future", - "draft", - "pending", - "private" - ], "required": false }, - "password": { - "description": "A password to protect access to the content and excerpt.", + "type": { + "description": "Type of template.", "type": "string", "required": false }, - "title": { - "description": "The title for the post.", - "type": "object", + "content": { + "description": "Content of template.", + "type": [ + "object", + "string" + ], "properties": { "raw": { - "description": "Title for the post, as it exists in the database.", + "description": "Content for the template, as it exists in the database.", "type": "string", "context": [ - "edit", - "embed" + "view", + "edit" ] }, - "rendered": { - "description": "HTML title for the post, transformed for display.", - "type": "string", + "block_version": { + "description": "Version of the content block format used by the template.", + "type": "integer", "context": [ - "view", - "edit", - "embed" + "edit" ], "readonly": true } }, "required": false }, - "content": { - "description": "The content for the post.", - "type": "object", + "title": { + "description": "Title of template.", + "type": [ + "object", + "string" + ], "properties": { "raw": { - "description": "Content for the post, as it exists in the database.", + "description": "Title for the template, as it exists in the database.", "type": "string", "context": [ + "view", "edit", "embed" ] }, "rendered": { - "description": "HTML content for the post, transformed for display.", + "description": "HTML title for the template, transformed for display.", "type": "string", "context": [ "view", @@ -6602,75 +6528,60 @@ mockedApiResponse.Schema = { "embed" ], "readonly": true - }, - "block_version": { - "description": "Version of the content block format used by the post.", - "type": "integer", - "context": [ - "edit", - "embed" - ], - "readonly": true - }, - "protected": { - "description": "Whether the content is protected with a password.", - "type": "boolean", - "context": [ - "view", - "edit", - "embed" - ], - "readonly": true } }, "required": false }, - "template": { - "description": "The theme file to use to display the post.", + "description": { + "description": "Description of template.", + "type": "string", + "required": false + }, + "status": { + "description": "Status of template.", + "type": "string", + "enum": [ + "publish", + "future", + "draft", + "pending", + "private" + ], + "required": false + }, + "author": { + "description": "The ID for the author of the template.", + "type": "integer", + "required": false + }, + "area": { + "description": "Where the template part is intended for use (header, footer, etc.)", "type": "string", "required": false } } - } - ] - }, - "/wp/v2/navigation/(?P[\\d]+)/autosaves/(?P[\\d]+)": { - "namespace": "wp/v2", - "methods": [ - "GET" - ], - "endpoints": [ + }, { "methods": [ - "GET" + "DELETE" ], "args": { - "parent": { - "description": "The ID for the parent of the autosave.", - "type": "integer", - "required": false - }, "id": { - "description": "The ID for the autosave.", - "type": "integer", + "description": "The id of a template", + "type": "string", "required": false }, - "context": { - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string", - "enum": [ - "view", - "embed", - "edit" - ], - "default": "view", + "force": { + "type": "boolean", + "default": false, + "description": "Whether to bypass Trash and force deletion.", "required": false } } } ] }, - "/wp/v2/font-families": { + "/wp/v2/navigation": { "namespace": "wp/v2", "methods": [ "GET", @@ -6681,6 +6592,9 @@ mockedApiResponse.Schema = { "methods": [ "GET" ], + "allow_batch": { + "v1": true + }, "args": { "context": { "description": "Scope under which the request is made; determines fields present in response.", @@ -6708,6 +6622,35 @@ mockedApiResponse.Schema = { "maximum": 100, "required": false }, + "search": { + "description": "Limit results to those matching a string.", + "type": "string", + "required": false + }, + "after": { + "description": "Limit response to posts published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_after": { + "description": "Limit response to posts modified after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to posts published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_before": { + "description": "Limit response to posts modified before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, "exclude": { "description": "Ensure result set excludes specific IDs.", "type": "array", @@ -6744,13 +6687,35 @@ mockedApiResponse.Schema = { "orderby": { "description": "Sort collection by post attribute.", "type": "string", - "default": "id", + "default": "date", "enum": [ + "author", + "date", "id", - "include" + "include", + "modified", + "parent", + "relevance", + "slug", + "include_slugs", + "title" ], "required": false }, + "search_columns": { + "default": [], + "description": "Array of column names to be searched.", + "type": "array", + "items": { + "enum": [ + "post_title", + "post_content", + "post_excerpt" + ], + "type": "string" + }, + "required": false + }, "slug": { "description": "Limit result set to posts with one or more specific slugs.", "type": "array", @@ -6758,26 +6723,154 @@ mockedApiResponse.Schema = { "type": "string" }, "required": false - } - } - }, - { - "methods": [ - "POST" - ], - "args": { - "theme_json_version": { - "description": "Version of the theme.json schema used for the typography settings.", - "type": "integer", - "default": 2, - "minimum": 2, - "maximum": 2, + }, + "status": { + "default": "publish", + "description": "Limit result set to posts assigned one or more statuses.", + "type": "array", + "items": { + "enum": [ + "publish", + "future", + "draft", + "pending", + "private", + "trash", + "auto-draft", + "inherit", + "request-pending", + "request-confirmed", + "request-failed", + "request-completed", + "any" + ], + "type": "string" + }, + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "allow_batch": { + "v1": true + }, + "args": { + "date": { + "description": "The date the post was published, in the site's timezone.", + "type": [ + "string", + "null" + ], + "format": "date-time", + "required": false + }, + "date_gmt": { + "description": "The date the post was published, as GMT.", + "type": [ + "string", + "null" + ], + "format": "date-time", + "required": false + }, + "slug": { + "description": "An alphanumeric identifier for the post unique to its type.", + "type": "string", + "required": false + }, + "status": { + "description": "A named status for the post.", + "type": "string", + "enum": [ + "publish", + "future", + "draft", + "pending", + "private" + ], + "required": false + }, + "password": { + "description": "A password to protect access to the content and excerpt.", + "type": "string", + "required": false + }, + "title": { + "description": "The title for the post.", + "type": "object", + "properties": { + "raw": { + "description": "Title for the post, as it exists in the database.", + "type": "string", + "context": [ + "edit", + "embed" + ] + }, + "rendered": { + "description": "HTML title for the post, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false + }, + "content": { + "description": "The content for the post.", + "type": "object", + "properties": { + "raw": { + "description": "Content for the post, as it exists in the database.", + "type": "string", + "context": [ + "edit", + "embed" + ] + }, + "rendered": { + "description": "HTML content for the post, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + }, + "block_version": { + "description": "Version of the content block format used by the post.", + "type": "integer", + "context": [ + "edit", + "embed" + ], + "readonly": true + }, + "protected": { + "description": "Whether the content is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, "required": false }, - "font_family_settings": { - "description": "font-family declaration in theme.json format, encoded as a string.", + "template": { + "description": "The theme file to use to display the post.", "type": "string", - "required": true + "required": false } } } @@ -6785,12 +6878,12 @@ mockedApiResponse.Schema = { "_links": { "self": [ { - "href": "http://example.org/index.php?rest_route=/wp/v2/font-families" + "href": "http://example.org/index.php?rest_route=/wp/v2/navigation" } ] } }, - "/wp/v2/font-families/(?P[\\d]+)": { + "/wp/v2/navigation/(?P[\\d]+)": { "namespace": "wp/v2", "methods": [ "GET", @@ -6804,6 +6897,9 @@ mockedApiResponse.Schema = { "methods": [ "GET" ], + "allow_batch": { + "v1": true + }, "args": { "id": { "description": "Unique identifier for the post.", @@ -6820,6 +6916,11 @@ mockedApiResponse.Schema = { ], "default": "view", "required": false + }, + "password": { + "description": "The password for the post if it is password protected.", + "type": "string", + "required": false } } }, @@ -6829,193 +6930,127 @@ mockedApiResponse.Schema = { "PUT", "PATCH" ], + "allow_batch": { + "v1": true + }, "args": { "id": { "description": "Unique identifier for the post.", "type": "integer", "required": false }, - "theme_json_version": { - "description": "Version of the theme.json schema used for the typography settings.", - "type": "integer", - "default": 2, - "minimum": 2, - "maximum": 2, - "required": false - }, - "font_family_settings": { - "description": "font-family declaration in theme.json format, encoded as a string.", - "type": "string", - "required": true - } - } - }, - { - "methods": [ - "DELETE" - ], - "args": { - "id": { - "description": "Unique identifier for the post.", - "type": "integer", - "required": false - }, - "force": { - "type": "boolean", - "default": false, - "description": "Whether to bypass Trash and force deletion.", - "required": false - } - } - } - ] - }, - "/wp/v2/font-families/(?P[\\d]+)/font-faces": { - "namespace": "wp/v2", - "methods": [ - "GET", - "POST" - ], - "endpoints": [ - { - "methods": [ - "GET" - ], - "args": { - "font_family_id": { - "description": "The ID for the parent font family of the font face.", - "type": "integer", - "required": true - }, - "context": { - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string", - "enum": [ - "view", - "embed", - "edit" - ], - "default": "view", - "required": false - }, - "page": { - "description": "Current page of the collection.", - "type": "integer", - "default": 1, - "minimum": 1, - "required": false - }, - "per_page": { - "description": "Maximum number of items to be returned in result set.", - "type": "integer", - "default": 10, - "minimum": 1, - "maximum": 100, - "required": false - }, - "exclude": { - "description": "Ensure result set excludes specific IDs.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [], - "required": false - }, - "include": { - "description": "Limit result set to specific IDs.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [], - "required": false - }, - "offset": { - "description": "Offset the result set by a specific number of items.", - "type": "integer", - "required": false - }, - "order": { - "description": "Order sort attribute ascending or descending.", - "type": "string", - "default": "desc", - "enum": [ - "asc", - "desc" + "date": { + "description": "The date the post was published, in the site's timezone.", + "type": [ + "string", + "null" ], + "format": "date-time", "required": false }, - "orderby": { - "description": "Sort collection by post attribute.", - "type": "string", - "default": "id", - "enum": [ - "id", - "include" + "date_gmt": { + "description": "The date the post was published, as GMT.", + "type": [ + "string", + "null" ], - "required": false - } - } - }, - { - "methods": [ - "POST" - ], - "args": { - "font_family_id": { - "description": "The ID for the parent font family of the font face.", - "type": "integer", - "required": true - }, - "theme_json_version": { - "description": "Version of the theme.json schema used for the typography settings.", - "type": "integer", - "default": 2, - "minimum": 2, - "maximum": 2, + "format": "date-time", "required": false }, - "font_face_settings": { - "description": "font-face declaration in theme.json format, encoded as a string.", + "slug": { + "description": "An alphanumeric identifier for the post unique to its type.", "type": "string", - "required": true - } - } - } - ] - }, - "/wp/v2/font-families/(?P[\\d]+)/font-faces/(?P[\\d]+)": { - "namespace": "wp/v2", - "methods": [ - "GET", - "DELETE" - ], - "endpoints": [ - { - "methods": [ - "GET" - ], - "args": { - "font_family_id": { - "description": "The ID for the parent font family of the font face.", - "type": "integer", - "required": true - }, - "id": { - "description": "Unique identifier for the font face.", - "type": "integer", - "required": true + "required": false }, - "context": { - "description": "Scope under which the request is made; determines fields present in response.", + "status": { + "description": "A named status for the post.", "type": "string", "enum": [ - "view", - "embed", - "edit" + "publish", + "future", + "draft", + "pending", + "private" ], - "default": "view", + "required": false + }, + "password": { + "description": "A password to protect access to the content and excerpt.", + "type": "string", + "required": false + }, + "title": { + "description": "The title for the post.", + "type": "object", + "properties": { + "raw": { + "description": "Title for the post, as it exists in the database.", + "type": "string", + "context": [ + "edit", + "embed" + ] + }, + "rendered": { + "description": "HTML title for the post, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false + }, + "content": { + "description": "The content for the post.", + "type": "object", + "properties": { + "raw": { + "description": "Content for the post, as it exists in the database.", + "type": "string", + "context": [ + "edit", + "embed" + ] + }, + "rendered": { + "description": "HTML content for the post, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + }, + "block_version": { + "description": "Version of the content block format used by the post.", + "type": "integer", + "context": [ + "edit", + "embed" + ], + "readonly": true + }, + "protected": { + "description": "Whether the content is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false + }, + "template": { + "description": "The theme file to use to display the post.", + "type": "string", "required": false } } @@ -7024,16 +7059,14 @@ mockedApiResponse.Schema = { "methods": [ "DELETE" ], + "allow_batch": { + "v1": true + }, "args": { - "font_family_id": { - "description": "The ID for the parent font family of the font face.", - "type": "integer", - "required": true - }, "id": { - "description": "Unique identifier for the font face.", + "description": "Unique identifier for the post.", "type": "integer", - "required": true + "required": false }, "force": { "type": "boolean", @@ -7045,11 +7078,10 @@ mockedApiResponse.Schema = { } ] }, - "/wp/v2/media": { + "/wp/v2/navigation/(?P[\\d]+)/revisions": { "namespace": "wp/v2", "methods": [ - "GET", - "POST" + "GET" ], "endpoints": [ { @@ -7057,6 +7089,11 @@ mockedApiResponse.Schema = { "GET" ], "args": { + "parent": { + "description": "The ID for the parent of the revision.", + "type": "integer", + "required": false + }, "context": { "description": "Scope under which the request is made; determines fields present in response.", "type": "string", @@ -7078,7 +7115,6 @@ mockedApiResponse.Schema = { "per_page": { "description": "Maximum number of items to be returned in result set.", "type": "integer", - "default": 10, "minimum": 1, "maximum": 100, "required": false @@ -7088,48 +7124,6 @@ mockedApiResponse.Schema = { "type": "string", "required": false }, - "after": { - "description": "Limit response to posts published after a given ISO8601 compliant date.", - "type": "string", - "format": "date-time", - "required": false - }, - "modified_after": { - "description": "Limit response to posts modified after a given ISO8601 compliant date.", - "type": "string", - "format": "date-time", - "required": false - }, - "author": { - "description": "Limit result set to posts assigned to specific authors.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [], - "required": false - }, - "author_exclude": { - "description": "Ensure result set excludes posts assigned to specific authors.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [], - "required": false - }, - "before": { - "description": "Limit response to posts published before a given ISO8601 compliant date.", - "type": "string", - "format": "date-time", - "required": false - }, - "modified_before": { - "description": "Limit response to posts modified before a given ISO8601 compliant date.", - "type": "string", - "format": "date-time", - "required": false - }, "exclude": { "description": "Ensure result set excludes specific IDs.", "type": "array", @@ -7164,94 +7158,110 @@ mockedApiResponse.Schema = { "required": false }, "orderby": { - "description": "Sort collection by post attribute.", + "description": "Sort collection by object attribute.", "type": "string", "default": "date", "enum": [ - "author", "date", "id", "include", - "modified", - "parent", "relevance", "slug", "include_slugs", "title" ], "required": false - }, + } + } + } + ] + }, + "/wp/v2/navigation/(?P[\\d]+)/revisions/(?P[\\d]+)": { + "namespace": "wp/v2", + "methods": [ + "GET", + "DELETE" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { "parent": { - "description": "Limit result set to items with particular parent IDs.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [], + "description": "The ID for the parent of the revision.", + "type": "integer", "required": false }, - "parent_exclude": { - "description": "Limit result set to all items except those of a particular parent ID.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [], + "id": { + "description": "Unique identifier for the revision.", + "type": "integer", "required": false }, - "search_columns": { - "default": [], - "description": "Array of column names to be searched.", - "type": "array", - "items": { - "enum": [ - "post_title", - "post_content", - "post_excerpt" - ], - "type": "string" - }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "embed", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "parent": { + "description": "The ID for the parent of the revision.", + "type": "integer", "required": false }, - "slug": { - "description": "Limit result set to posts with one or more specific slugs.", - "type": "array", - "items": { - "type": "string" - }, + "id": { + "description": "Unique identifier for the revision.", + "type": "integer", "required": false }, - "status": { - "default": "inherit", - "description": "Limit result set to posts assigned one or more statuses.", - "type": "array", - "items": { - "enum": [ - "inherit", - "private", - "trash" - ], - "type": "string" - }, + "force": { + "type": "boolean", + "default": false, + "description": "Required to be true, as revisions do not support trashing.", + "required": false + } + } + } + ] + }, + "/wp/v2/navigation/(?P[\\d]+)/autosaves": { + "namespace": "wp/v2", + "methods": [ + "GET", + "POST" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "parent": { + "description": "The ID for the parent of the autosave.", + "type": "integer", "required": false }, - "media_type": { - "default": null, - "description": "Limit result set to attachments of a particular media type.", + "context": { + "description": "Scope under which the request is made; determines fields present in response.", "type": "string", "enum": [ - "image", - "video", - "text", - "application", - "audio" + "view", + "embed", + "edit" ], - "required": false - }, - "mime_type": { - "default": null, - "description": "Limit result set to attachments of a particular MIME type.", - "type": "string", + "default": "view", "required": false } } @@ -7261,6 +7271,11 @@ mockedApiResponse.Schema = { "POST" ], "args": { + "parent": { + "description": "The ID for the parent of the autosave.", + "type": "integer", + "required": false + }, "date": { "description": "The date the post was published, in the site's timezone.", "type": [ @@ -7296,6 +7311,11 @@ mockedApiResponse.Schema = { ], "required": false }, + "password": { + "description": "A password to protect access to the content and excerpt.", + "type": "string", + "required": false + }, "title": { "description": "The title for the post.", "type": "object", @@ -7304,7 +7324,8 @@ mockedApiResponse.Schema = { "description": "Title for the post, as it exists in the database.", "type": "string", "context": [ - "edit" + "edit", + "embed" ] }, "rendered": { @@ -7320,110 +7341,216 @@ mockedApiResponse.Schema = { }, "required": false }, - "author": { - "description": "The ID for the author of the post.", + "content": { + "description": "The content for the post.", + "type": "object", + "properties": { + "raw": { + "description": "Content for the post, as it exists in the database.", + "type": "string", + "context": [ + "edit", + "embed" + ] + }, + "rendered": { + "description": "HTML content for the post, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + }, + "block_version": { + "description": "Version of the content block format used by the post.", + "type": "integer", + "context": [ + "edit", + "embed" + ], + "readonly": true + }, + "protected": { + "description": "Whether the content is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false + }, + "template": { + "description": "The theme file to use to display the post.", + "type": "string", + "required": false + } + } + } + ] + }, + "/wp/v2/navigation/(?P[\\d]+)/autosaves/(?P[\\d]+)": { + "namespace": "wp/v2", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "parent": { + "description": "The ID for the parent of the autosave.", "type": "integer", "required": false }, - "featured_media": { - "description": "The ID of the featured media for the post.", + "id": { + "description": "The ID for the autosave.", "type": "integer", "required": false }, - "comment_status": { - "description": "Whether or not comments are open on the post.", + "context": { + "description": "Scope under which the request is made; determines fields present in response.", "type": "string", "enum": [ - "open", - "closed" + "view", + "embed", + "edit" ], + "default": "view", "required": false - }, - "ping_status": { - "description": "Whether or not the post can be pinged.", + } + } + } + ] + }, + "/wp/v2/font-families": { + "namespace": "wp/v2", + "methods": [ + "GET", + "POST" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", "type": "string", "enum": [ - "open", - "closed" + "view", + "embed", + "edit" ], + "default": "view", "required": false }, - "meta": { - "description": "Meta fields.", - "type": "object", - "properties": [], + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, "required": false }, - "template": { - "description": "The theme file to use to display the post.", - "type": "string", + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, "required": false }, - "alt_text": { - "description": "Alternative text to display when attachment is not displayed.", - "type": "string", + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], "required": false }, - "caption": { - "description": "The attachment caption.", - "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 - } + "include": { + "description": "Limit result set to specific IDs.", + "type": "array", + "items": { + "type": "integer" }, + "default": [], "required": false }, - "description": { - "description": "The attachment description.", - "type": "object", - "properties": { - "raw": { - "description": "Description for the attachment, as it exists in the database.", - "type": "string", - "context": [ - "edit" - ] - }, - "rendered": { - "description": "HTML description for the attachment, transformed for display.", - "type": "string", - "context": [ - "view", - "edit" - ], - "readonly": true - } - }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by post attribute.", + "type": "string", + "default": "id", + "enum": [ + "id", + "include" + ], "required": false }, - "post": { - "description": "The ID for the associated post of the attachment.", + "slug": { + "description": "Limit result set to posts with one or more specific slugs.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "theme_json_version": { + "description": "Version of the theme.json schema used for the typography settings.", "type": "integer", + "default": 2, + "minimum": 2, + "maximum": 2, "required": false + }, + "font_family_settings": { + "description": "font-family declaration in theme.json format, encoded as a string.", + "type": "string", + "required": true } } } ], "_links": { - "self": "http://example.org/index.php?rest_route=/wp/v2/media" + "self": [ + { + "href": "http://example.org/index.php?rest_route=/wp/v2/font-families" + } + ] } }, - "/wp/v2/media/(?P[\\d]+)": { + "/wp/v2/font-families/(?P[\\d]+)": { "namespace": "wp/v2", "methods": [ "GET", @@ -7468,343 +7595,210 @@ mockedApiResponse.Schema = { "type": "integer", "required": false }, - "date": { - "description": "The date the post was published, in the site's timezone.", - "type": [ - "string", - "null" - ], - "format": "date-time", + "theme_json_version": { + "description": "Version of the theme.json schema used for the typography settings.", + "type": "integer", + "default": 2, + "minimum": 2, + "maximum": 2, "required": false }, - "date_gmt": { - "description": "The date the post was published, as GMT.", - "type": [ - "string", - "null" - ], - "format": "date-time", + "font_family_settings": { + "description": "font-family declaration in theme.json format, encoded as a string.", + "type": "string", + "required": true + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "id": { + "description": "Unique identifier for the post.", + "type": "integer", "required": false }, - "slug": { - "description": "An alphanumeric identifier for the post unique to its type.", - "type": "string", + "force": { + "type": "boolean", + "default": false, + "description": "Whether to bypass Trash and force deletion.", "required": false + } + } + } + ] + }, + "/wp/v2/font-families/(?P[\\d]+)/font-faces": { + "namespace": "wp/v2", + "methods": [ + "GET", + "POST" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "font_family_id": { + "description": "The ID for the parent font family of the font face.", + "type": "integer", + "required": true }, - "status": { - "description": "A named status for the post.", + "context": { + "description": "Scope under which the request is made; determines fields present in response.", "type": "string", "enum": [ - "publish", - "future", - "draft", - "pending", - "private" + "view", + "embed", + "edit" ], + "default": "view", "required": false }, - "title": { - "description": "The title for the post.", - "type": "object", - "properties": { - "raw": { - "description": "Title for the post, as it exists in the database.", - "type": "string", - "context": [ - "edit" - ] - }, - "rendered": { - "description": "HTML title for the post, transformed for display.", - "type": "string", - "context": [ - "view", - "edit", - "embed" - ], - "readonly": true - } - }, - "required": false - }, - "author": { - "description": "The ID for the author of the post.", + "page": { + "description": "Current page of the collection.", "type": "integer", + "default": 1, + "minimum": 1, "required": false }, - "featured_media": { - "description": "The ID of the featured media for the post.", + "per_page": { + "description": "Maximum number of items to be returned in result set.", "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, "required": false }, - "comment_status": { - "description": "Whether or not comments are open on the post.", - "type": "string", - "enum": [ - "open", - "closed" - ], - "required": false - }, - "ping_status": { - "description": "Whether or not the post can be pinged.", - "type": "string", - "enum": [ - "open", - "closed" - ], + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], "required": false }, - "meta": { - "description": "Meta fields.", - "type": "object", - "properties": [], + "include": { + "description": "Limit result set to specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], "required": false }, - "template": { - "description": "The theme file to use to display the post.", - "type": "string", + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", "required": false }, - "alt_text": { - "description": "Alternative text to display when attachment is not displayed.", + "order": { + "description": "Order sort attribute ascending or descending.", "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], "required": false }, - "caption": { - "description": "The attachment caption.", - "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": { - "description": "The attachment description.", - "type": "object", - "properties": { - "raw": { - "description": "Description for the attachment, as it exists in the database.", - "type": "string", - "context": [ - "edit" - ] - }, - "rendered": { - "description": "HTML description for the attachment, transformed for display.", - "type": "string", - "context": [ - "view", - "edit" - ], - "readonly": true - } - }, - "required": false - }, - "post": { - "description": "The ID for the associated post of the attachment.", - "type": "integer", + "orderby": { + "description": "Sort collection by post attribute.", + "type": "string", + "default": "id", + "enum": [ + "id", + "include" + ], "required": false } } }, { "methods": [ - "DELETE" + "POST" ], "args": { - "id": { - "description": "Unique identifier for the post.", + "font_family_id": { + "description": "The ID for the parent font family of the font face.", "type": "integer", - "required": false + "required": true }, - "force": { - "type": "boolean", - "default": false, - "description": "Whether to bypass Trash and force deletion.", + "theme_json_version": { + "description": "Version of the theme.json schema used for the typography settings.", + "type": "integer", + "default": 2, + "minimum": 2, + "maximum": 2, "required": false + }, + "font_face_settings": { + "description": "font-face declaration in theme.json format, encoded as a string.", + "type": "string", + "required": true } } } ] }, - "/wp/v2/media/(?P[\\d]+)/post-process": { + "/wp/v2/font-families/(?P[\\d]+)/font-faces/(?P[\\d]+)": { "namespace": "wp/v2", "methods": [ - "POST" + "GET", + "DELETE" ], "endpoints": [ { "methods": [ - "POST" + "GET" ], "args": { + "font_family_id": { + "description": "The ID for the parent font family of the font face.", + "type": "integer", + "required": true + }, "id": { - "description": "Unique identifier for the attachment.", + "description": "Unique identifier for the font face.", "type": "integer", - "required": false + "required": true }, - "action": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", "type": "string", "enum": [ - "create-image-subsizes" + "view", + "embed", + "edit" ], - "required": true + "default": "view", + "required": false } } - } - ] - }, - "/wp/v2/media/(?P[\\d]+)/edit": { - "namespace": "wp/v2", - "methods": [ - "POST" - ], - "endpoints": [ + }, { "methods": [ - "POST" + "DELETE" ], "args": { - "src": { - "description": "URL to the edited image file.", - "type": "string", - "format": "uri", + "font_family_id": { + "description": "The ID for the parent font family of the font face.", + "type": "integer", "required": true }, - "modifiers": { - "description": "Array of image edits.", - "type": "array", - "minItems": 1, - "items": { - "description": "Image edit.", - "type": "object", - "required": [ - "type", - "args" - ], - "oneOf": [ - { - "title": "Rotation", - "properties": { - "type": { - "description": "Rotation type.", - "type": "string", - "enum": [ - "rotate" - ] - }, - "args": { - "description": "Rotation arguments.", - "type": "object", - "required": [ - "angle" - ], - "properties": { - "angle": { - "description": "Angle to rotate clockwise in degrees.", - "type": "number" - } - } - } - } - }, - { - "title": "Crop", - "properties": { - "type": { - "description": "Crop type.", - "type": "string", - "enum": [ - "crop" - ] - }, - "args": { - "description": "Crop arguments.", - "type": "object", - "required": [ - "left", - "top", - "width", - "height" - ], - "properties": { - "left": { - "description": "Horizontal position from the left to begin the crop as a percentage of the image width.", - "type": "number" - }, - "top": { - "description": "Vertical position from the top to begin the crop as a percentage of the image height.", - "type": "number" - }, - "width": { - "description": "Width of the crop as a percentage of the image width.", - "type": "number" - }, - "height": { - "description": "Height of the crop as a percentage of the image height.", - "type": "number" - } - } - } - } - } - ] - }, - "required": false - }, - "rotation": { - "description": "The amount to rotate the image clockwise in degrees. DEPRECATED: Use `modifiers` instead.", + "id": { + "description": "Unique identifier for the font face.", "type": "integer", - "minimum": 0, - "exclusiveMinimum": true, - "maximum": 360, - "exclusiveMaximum": true, - "required": false - }, - "x": { - "description": "As a percentage of the image, the x position to start the crop from. DEPRECATED: Use `modifiers` instead.", - "type": "number", - "minimum": 0, - "maximum": 100, - "required": false - }, - "y": { - "description": "As a percentage of the image, the y position to start the crop from. DEPRECATED: Use `modifiers` instead.", - "type": "number", - "minimum": 0, - "maximum": 100, - "required": false - }, - "width": { - "description": "As a percentage of the image, the width to crop the image to. DEPRECATED: Use `modifiers` instead.", - "type": "number", - "minimum": 0, - "maximum": 100, - "required": false + "required": true }, - "height": { - "description": "As a percentage of the image, the height to crop the image to. DEPRECATED: Use `modifiers` instead.", - "type": "number", - "minimum": 0, - "maximum": 100, + "force": { + "type": "boolean", + "default": false, + "description": "Whether to bypass Trash and force deletion.", "required": false } } @@ -9175,14 +9169,14 @@ mockedApiResponse.Schema = { "enum": { "post": "post", "page": "page", + "attachment": "attachment", "nav_menu_item": "nav_menu_item", "wp_block": "wp_block", "wp_template": "wp_template", "wp_template_part": "wp_template_part", "wp_navigation": "wp_navigation", "wp_font_family": "wp_font_family", - "wp_font_face": "wp_font_face", - "attachment": "attachment" + "wp_font_face": "wp_font_face" } }, "required": false @@ -10618,88 +10612,105 @@ mockedApiResponse.Schema = { ], "args": { "title": { + "title": "Title", "description": "Site title.", "type": "string", "required": false }, "description": { + "title": "Tagline", "description": "Site tagline.", "type": "string", "required": false }, "url": { + "title": "", "description": "Site URL.", "type": "string", "format": "uri", "required": false }, "email": { + "title": "", "description": "This address is used for admin purposes, like new user notification.", "type": "string", "format": "email", "required": false }, "timezone": { + "title": "", "description": "A city in the same timezone as you.", "type": "string", "required": false }, "date_format": { + "title": "", "description": "A date format for all date strings.", "type": "string", "required": false }, "time_format": { + "title": "", "description": "A time format for all time strings.", "type": "string", "required": false }, "start_of_week": { + "title": "", "description": "A day number of the week that the week should start on.", "type": "integer", "required": false }, "language": { + "title": "", "description": "WordPress locale code.", "type": "string", "required": false }, "use_smilies": { + "title": "", "description": "Convert emoticons like :-) and :-P to graphics on display.", "type": "boolean", "required": false }, "default_category": { + "title": "", "description": "Default post category.", "type": "integer", "required": false }, "default_post_format": { + "title": "", "description": "Default post format.", "type": "string", "required": false }, "posts_per_page": { + "title": "Maximum posts per page", "description": "Blog pages show at most.", "type": "integer", "required": false }, "show_on_front": { + "title": "Show on front", "description": "What to show on the front page", "type": "string", "required": false }, "page_on_front": { + "title": "Page on front", "description": "The ID of the page that should be displayed on the front page", "type": "integer", "required": false }, "page_for_posts": { + "title": "", "description": "The ID of the page that should display the latest posts", "type": "integer", "required": false }, "default_ping_status": { + "title": "", "description": "Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.", "type": "string", "enum": [ @@ -10709,6 +10720,7 @@ mockedApiResponse.Schema = { "required": false }, "default_comment_status": { + "title": "Allow comments on new posts", "description": "Allow people to submit comments on new posts.", "type": "string", "enum": [ @@ -10718,11 +10730,13 @@ mockedApiResponse.Schema = { "required": false }, "site_logo": { + "title": "", "description": "Site logo.", "type": "integer", "required": false }, "site_icon": { + "title": "", "description": "Site icon.", "type": "integer", "required": false @@ -12863,6 +12877,36 @@ mockedApiResponse.TypesCollection = { ] } }, + "attachment": { + "description": "", + "hierarchical": false, + "has_archive": false, + "name": "Media", + "slug": "attachment", + "icon": "dashicons-admin-media", + "taxonomies": [], + "rest_base": "media", + "rest_namespace": "wp/v2", + "_links": { + "collection": [ + { + "href": "http://example.org/index.php?rest_route=/wp/v2/types" + } + ], + "wp:items": [ + { + "href": "http://example.org/index.php?rest_route=/wp/v2/media" + } + ], + "curies": [ + { + "name": "wp", + "href": "https://api.w.org/{rel}", + "templated": true + } + ] + } + }, "nav_menu_item": { "description": "", "hierarchical": false, @@ -13076,36 +13120,6 @@ mockedApiResponse.TypesCollection = { } ] } - }, - "attachment": { - "description": "", - "hierarchical": false, - "has_archive": false, - "name": "Media", - "slug": "attachment", - "icon": "dashicons-admin-media", - "taxonomies": [], - "rest_base": "media", - "rest_namespace": "wp/v2", - "_links": { - "collection": [ - { - "href": "http://example.org/index.php?rest_route=/wp/v2/types" - } - ], - "wp:items": [ - { - "href": "http://example.org/index.php?rest_route=/wp/v2/media" - } - ], - "curies": [ - { - "name": "wp", - "href": "https://api.w.org/{rel}", - "templated": true - } - ] - } } }; From 8f30043400fb44f4190fb9f0ae1307dfdf964e07 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Fri, 3 May 2024 18:40:02 +0400 Subject: [PATCH 6/6] Update WP API fixtures once more --- tests/qunit/fixtures/wp-api-generated.js | 3014 +++++++++++----------- 1 file changed, 1510 insertions(+), 1504 deletions(-) diff --git a/tests/qunit/fixtures/wp-api-generated.js b/tests/qunit/fixtures/wp-api-generated.js index 6743ef3a1a8d6..06a7e7aa880d2 100644 --- a/tests/qunit/fixtures/wp-api-generated.js +++ b/tests/qunit/fixtures/wp-api-generated.js @@ -18,7 +18,13 @@ mockedApiResponse.Schema = { "wp-site-health/v1", "wp-block-editor/v1" ], - "authentication": [], + "authentication": { + "application-passwords": { + "endpoints": { + "authorization": "http://example.org/wp-admin/authorize-application.php" + } + } + }, "routes": { "/": { "namespace": "", @@ -2711,7 +2717,7 @@ mockedApiResponse.Schema = { } ] }, - "/wp/v2/media": { + "/wp/v2/menu-items": { "namespace": "wp/v2", "methods": [ "GET", @@ -2722,6 +2728,9 @@ mockedApiResponse.Schema = { "methods": [ "GET" ], + "allow_batch": { + "v1": true + }, "args": { "context": { "description": "Scope under which the request is made; determines fields present in response.", @@ -2744,7 +2753,7 @@ mockedApiResponse.Schema = { "per_page": { "description": "Maximum number of items to be returned in result set.", "type": "integer", - "default": 10, + "default": 100, "minimum": 1, "maximum": 100, "required": false @@ -2766,24 +2775,6 @@ mockedApiResponse.Schema = { "format": "date-time", "required": false }, - "author": { - "description": "Limit result set to posts assigned to specific authors.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [], - "required": false - }, - "author_exclude": { - "description": "Ensure result set excludes posts assigned to specific authors.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [], - "required": false - }, "before": { "description": "Limit response to posts published before a given ISO8601 compliant date.", "type": "string", @@ -2822,7 +2813,7 @@ mockedApiResponse.Schema = { "order": { "description": "Order sort attribute ascending or descending.", "type": "string", - "default": "desc", + "default": "asc", "enum": [ "asc", "desc" @@ -2830,9 +2821,9 @@ mockedApiResponse.Schema = { "required": false }, "orderby": { - "description": "Sort collection by post attribute.", + "description": "Sort collection by object attribute.", "type": "string", - "default": "date", + "default": "menu_order", "enum": [ "author", "date", @@ -2843,28 +2834,11 @@ mockedApiResponse.Schema = { "relevance", "slug", "include_slugs", - "title" + "title", + "menu_order" ], "required": false }, - "parent": { - "description": "Limit result set to items with particular parent IDs.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [], - "required": false - }, - "parent_exclude": { - "description": "Limit result set to all items except those of a particular parent ID.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [], - "required": false - }, "search_columns": { "default": [], "description": "Array of column names to be searched.", @@ -2888,36 +2862,118 @@ mockedApiResponse.Schema = { "required": false }, "status": { - "default": "inherit", + "default": "publish", "description": "Limit result set to posts assigned one or more statuses.", "type": "array", "items": { "enum": [ - "inherit", + "publish", + "future", + "draft", + "pending", "private", - "trash" + "trash", + "auto-draft", + "inherit", + "request-pending", + "request-confirmed", + "request-failed", + "request-completed", + "any" ], "type": "string" }, "required": false }, - "media_type": { - "default": null, - "description": "Limit result set to attachments of a particular media type.", + "tax_relation": { + "description": "Limit result set based on relationship between multiple taxonomies.", "type": "string", "enum": [ - "image", - "video", - "text", - "application", - "audio" + "AND", + "OR" ], "required": false }, - "mime_type": { - "default": null, - "description": "Limit result set to attachments of a particular MIME type.", - "type": "string", + "menus": { + "description": "Limit result set to items with specific terms assigned in the menus taxonomy.", + "type": [ + "object", + "array" + ], + "oneOf": [ + { + "title": "Term ID List", + "description": "Match terms with the listed IDs.", + "type": "array", + "items": { + "type": "integer" + } + }, + { + "title": "Term ID Taxonomy Query", + "description": "Perform an advanced term query.", + "type": "object", + "properties": { + "terms": { + "description": "Term IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [] + }, + "operator": { + "description": "Whether items must be assigned all or any of the specified terms.", + "type": "string", + "enum": [ + "AND", + "OR" + ], + "default": "OR" + } + }, + "additionalProperties": false + } + ], + "required": false + }, + "menus_exclude": { + "description": "Limit result set to items except those with specific terms assigned in the menus taxonomy.", + "type": [ + "object", + "array" + ], + "oneOf": [ + { + "title": "Term ID List", + "description": "Match terms with the listed IDs.", + "type": "array", + "items": { + "type": "integer" + } + }, + { + "title": "Term ID Taxonomy Query", + "description": "Perform an advanced term query.", + "type": "object", + "properties": { + "terms": { + "description": "Term IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [] + } + }, + "additionalProperties": false + } + ], + "required": false + }, + "menu_order": { + "description": "Limit result set to posts with a specific menu_order value.", + "type": "integer", "required": false } } @@ -2926,55 +2982,26 @@ mockedApiResponse.Schema = { "methods": [ "POST" ], + "allow_batch": { + "v1": true + }, "args": { - "date": { - "description": "The date the post was published, in the site's timezone.", - "type": [ - "string", - "null" - ], - "format": "date-time", - "required": false - }, - "date_gmt": { - "description": "The date the post was published, as GMT.", + "title": { + "description": "The title for the object.", "type": [ "string", - "null" - ], - "format": "date-time", - "required": false - }, - "slug": { - "description": "An alphanumeric identifier for the post unique to its type.", - "type": "string", - "required": false - }, - "status": { - "description": "A named status for the post.", - "type": "string", - "enum": [ - "publish", - "future", - "draft", - "pending", - "private" + "object" ], - "required": false - }, - "title": { - "description": "The title for the post.", - "type": "object", "properties": { "raw": { - "description": "Title for the post, as it exists in the database.", + "description": "Title for the object, as it exists in the database.", "type": "string", "context": [ "edit" ] }, "rendered": { - "description": "HTML title for the post, transformed for display.", + "description": "HTML title for the object, transformed for display.", "type": "string", "context": [ "view", @@ -2986,110 +3013,121 @@ mockedApiResponse.Schema = { }, "required": false }, - "author": { - "description": "The ID for the author of the post.", - "type": "integer", - "required": false - }, - "featured_media": { - "description": "The ID of the featured media for the post.", - "type": "integer", - "required": false - }, - "comment_status": { - "description": "Whether or not comments are open on the post.", + "type": { + "default": "custom", + "description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\".", "type": "string", "enum": [ - "open", - "closed" + "taxonomy", + "post_type", + "post_type_archive", + "custom" ], "required": false }, - "ping_status": { - "description": "Whether or not the post can be pinged.", + "status": { + "default": "publish", + "description": "A named status for the object.", "type": "string", "enum": [ - "open", - "closed" + "publish", + "future", + "draft", + "pending", + "private" ], "required": false }, - "meta": { - "description": "Meta fields.", - "type": "object", - "properties": [], + "parent": { + "default": 0, + "description": "The ID for the parent of the object.", + "type": "integer", + "minimum": 0, "required": false }, - "template": { - "description": "The theme file to use to display the post.", + "attr_title": { + "description": "Text for the title attribute of the link element for this menu item.", "type": "string", "required": false }, - "alt_text": { - "description": "Alternative text to display when attachment is not displayed.", + "classes": { + "description": "Class names for the link element of this menu item.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "description": { + "description": "The description of this menu item.", "type": "string", "required": false }, - "caption": { - "description": "The attachment caption.", - "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 - } - }, + "menu_order": { + "default": 1, + "description": "The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0.", + "type": "integer", + "minimum": 1, "required": false }, - "description": { - "description": "The attachment description.", - "type": "object", - "properties": { - "raw": { - "description": "Description for the attachment, as it exists in the database.", - "type": "string", - "context": [ - "edit" - ] - }, - "rendered": { - "description": "HTML description for the attachment, transformed for display.", - "type": "string", - "context": [ - "view", - "edit" - ], - "readonly": true - } + "object": { + "description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\".", + "type": "string", + "required": false + }, + "object_id": { + "default": 0, + "description": "The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories.", + "type": "integer", + "minimum": 0, + "required": false + }, + "target": { + "description": "The target attribute of the link element for this menu item.", + "type": "string", + "enum": [ + "_blank", + "" + ], + "required": false + }, + "url": { + "description": "The URL to which this menu item points.", + "type": "string", + "format": "uri", + "required": false + }, + "xfn": { + "description": "The XFN relationship expressed in the link of this menu item.", + "type": "array", + "items": { + "type": "string" }, "required": false }, - "post": { - "description": "The ID for the associated post of the attachment.", + "menus": { + "description": "The terms assigned to the object in the nav_menu taxonomy.", "type": "integer", "required": false + }, + "meta": { + "description": "Meta fields.", + "type": "object", + "properties": [], + "required": false } } } ], "_links": { - "self": "http://example.org/index.php?rest_route=/wp/v2/media" + "self": [ + { + "href": "http://example.org/index.php?rest_route=/wp/v2/menu-items" + } + ] } }, - "/wp/v2/media/(?P[\\d]+)": { + "/wp/v2/menu-items/(?P[\\d]+)": { "namespace": "wp/v2", "methods": [ "GET", @@ -3103,6 +3141,9 @@ mockedApiResponse.Schema = { "methods": [ "GET" ], + "allow_batch": { + "v1": true + }, "args": { "id": { "description": "Unique identifier for the post.", @@ -3128,60 +3169,31 @@ mockedApiResponse.Schema = { "PUT", "PATCH" ], + "allow_batch": { + "v1": true + }, "args": { "id": { "description": "Unique identifier for the post.", "type": "integer", "required": false }, - "date": { - "description": "The date the post was published, in the site's timezone.", - "type": [ - "string", - "null" - ], - "format": "date-time", - "required": false - }, - "date_gmt": { - "description": "The date the post was published, as GMT.", + "title": { + "description": "The title for the object.", "type": [ "string", - "null" - ], - "format": "date-time", - "required": false - }, - "slug": { - "description": "An alphanumeric identifier for the post unique to its type.", - "type": "string", - "required": false - }, - "status": { - "description": "A named status for the post.", - "type": "string", - "enum": [ - "publish", - "future", - "draft", - "pending", - "private" + "object" ], - "required": false - }, - "title": { - "description": "The title for the post.", - "type": "object", "properties": { "raw": { - "description": "Title for the post, as it exists in the database.", + "description": "Title for the object, as it exists in the database.", "type": "string", "context": [ "edit" ] }, "rendered": { - "description": "HTML title for the post, transformed for display.", + "description": "HTML title for the object, transformed for display.", "type": "string", "context": [ "view", @@ -3193,823 +3205,51 @@ mockedApiResponse.Schema = { }, "required": false }, - "author": { - "description": "The ID for the author of the post.", - "type": "integer", - "required": false - }, - "featured_media": { - "description": "The ID of the featured media for the post.", - "type": "integer", - "required": false - }, - "comment_status": { - "description": "Whether or not comments are open on the post.", + "type": { + "description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\".", "type": "string", "enum": [ - "open", - "closed" + "taxonomy", + "post_type", + "post_type_archive", + "custom" ], "required": false }, - "ping_status": { - "description": "Whether or not the post can be pinged.", + "status": { + "description": "A named status for the object.", "type": "string", "enum": [ - "open", - "closed" + "publish", + "future", + "draft", + "pending", + "private" ], "required": false }, - "meta": { - "description": "Meta fields.", - "type": "object", - "properties": [], - "required": false - }, - "template": { - "description": "The theme file to use to display the post.", - "type": "string", + "parent": { + "description": "The ID for the parent of the object.", + "type": "integer", + "minimum": 0, "required": false }, - "alt_text": { - "description": "Alternative text to display when attachment is not displayed.", + "attr_title": { + "description": "Text for the title attribute of the link element for this menu item.", "type": "string", "required": false }, - "caption": { - "description": "The attachment caption.", - "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 - } + "classes": { + "description": "Class names for the link element of this menu item.", + "type": "array", + "items": { + "type": "string" }, "required": false }, "description": { - "description": "The attachment description.", - "type": "object", - "properties": { - "raw": { - "description": "Description for the attachment, as it exists in the database.", - "type": "string", - "context": [ - "edit" - ] - }, - "rendered": { - "description": "HTML description for the attachment, transformed for display.", - "type": "string", - "context": [ - "view", - "edit" - ], - "readonly": true - } - }, - "required": false - }, - "post": { - "description": "The ID for the associated post of the attachment.", - "type": "integer", - "required": false - } - } - }, - { - "methods": [ - "DELETE" - ], - "args": { - "id": { - "description": "Unique identifier for the post.", - "type": "integer", - "required": false - }, - "force": { - "type": "boolean", - "default": false, - "description": "Whether to bypass Trash and force deletion.", - "required": false - } - } - } - ] - }, - "/wp/v2/media/(?P[\\d]+)/post-process": { - "namespace": "wp/v2", - "methods": [ - "POST" - ], - "endpoints": [ - { - "methods": [ - "POST" - ], - "args": { - "id": { - "description": "Unique identifier for the attachment.", - "type": "integer", - "required": false - }, - "action": { - "type": "string", - "enum": [ - "create-image-subsizes" - ], - "required": true - } - } - } - ] - }, - "/wp/v2/media/(?P[\\d]+)/edit": { - "namespace": "wp/v2", - "methods": [ - "POST" - ], - "endpoints": [ - { - "methods": [ - "POST" - ], - "args": { - "src": { - "description": "URL to the edited image file.", - "type": "string", - "format": "uri", - "required": true - }, - "modifiers": { - "description": "Array of image edits.", - "type": "array", - "minItems": 1, - "items": { - "description": "Image edit.", - "type": "object", - "required": [ - "type", - "args" - ], - "oneOf": [ - { - "title": "Rotation", - "properties": { - "type": { - "description": "Rotation type.", - "type": "string", - "enum": [ - "rotate" - ] - }, - "args": { - "description": "Rotation arguments.", - "type": "object", - "required": [ - "angle" - ], - "properties": { - "angle": { - "description": "Angle to rotate clockwise in degrees.", - "type": "number" - } - } - } - } - }, - { - "title": "Crop", - "properties": { - "type": { - "description": "Crop type.", - "type": "string", - "enum": [ - "crop" - ] - }, - "args": { - "description": "Crop arguments.", - "type": "object", - "required": [ - "left", - "top", - "width", - "height" - ], - "properties": { - "left": { - "description": "Horizontal position from the left to begin the crop as a percentage of the image width.", - "type": "number" - }, - "top": { - "description": "Vertical position from the top to begin the crop as a percentage of the image height.", - "type": "number" - }, - "width": { - "description": "Width of the crop as a percentage of the image width.", - "type": "number" - }, - "height": { - "description": "Height of the crop as a percentage of the image height.", - "type": "number" - } - } - } - } - } - ] - }, - "required": false - }, - "rotation": { - "description": "The amount to rotate the image clockwise in degrees. DEPRECATED: Use `modifiers` instead.", - "type": "integer", - "minimum": 0, - "exclusiveMinimum": true, - "maximum": 360, - "exclusiveMaximum": true, - "required": false - }, - "x": { - "description": "As a percentage of the image, the x position to start the crop from. DEPRECATED: Use `modifiers` instead.", - "type": "number", - "minimum": 0, - "maximum": 100, - "required": false - }, - "y": { - "description": "As a percentage of the image, the y position to start the crop from. DEPRECATED: Use `modifiers` instead.", - "type": "number", - "minimum": 0, - "maximum": 100, - "required": false - }, - "width": { - "description": "As a percentage of the image, the width to crop the image to. DEPRECATED: Use `modifiers` instead.", - "type": "number", - "minimum": 0, - "maximum": 100, - "required": false - }, - "height": { - "description": "As a percentage of the image, the height to crop the image to. DEPRECATED: Use `modifiers` instead.", - "type": "number", - "minimum": 0, - "maximum": 100, - "required": false - } - } - } - ] - }, - "/wp/v2/menu-items": { - "namespace": "wp/v2", - "methods": [ - "GET", - "POST" - ], - "endpoints": [ - { - "methods": [ - "GET" - ], - "allow_batch": { - "v1": true - }, - "args": { - "context": { - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string", - "enum": [ - "view", - "embed", - "edit" - ], - "default": "view", - "required": false - }, - "page": { - "description": "Current page of the collection.", - "type": "integer", - "default": 1, - "minimum": 1, - "required": false - }, - "per_page": { - "description": "Maximum number of items to be returned in result set.", - "type": "integer", - "default": 100, - "minimum": 1, - "maximum": 100, - "required": false - }, - "search": { - "description": "Limit results to those matching a string.", - "type": "string", - "required": false - }, - "after": { - "description": "Limit response to posts published after a given ISO8601 compliant date.", - "type": "string", - "format": "date-time", - "required": false - }, - "modified_after": { - "description": "Limit response to posts modified after a given ISO8601 compliant date.", - "type": "string", - "format": "date-time", - "required": false - }, - "before": { - "description": "Limit response to posts published before a given ISO8601 compliant date.", - "type": "string", - "format": "date-time", - "required": false - }, - "modified_before": { - "description": "Limit response to posts modified before a given ISO8601 compliant date.", - "type": "string", - "format": "date-time", - "required": false - }, - "exclude": { - "description": "Ensure result set excludes specific IDs.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [], - "required": false - }, - "include": { - "description": "Limit result set to specific IDs.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [], - "required": false - }, - "offset": { - "description": "Offset the result set by a specific number of items.", - "type": "integer", - "required": false - }, - "order": { - "description": "Order sort attribute ascending or descending.", - "type": "string", - "default": "asc", - "enum": [ - "asc", - "desc" - ], - "required": false - }, - "orderby": { - "description": "Sort collection by object attribute.", - "type": "string", - "default": "menu_order", - "enum": [ - "author", - "date", - "id", - "include", - "modified", - "parent", - "relevance", - "slug", - "include_slugs", - "title", - "menu_order" - ], - "required": false - }, - "search_columns": { - "default": [], - "description": "Array of column names to be searched.", - "type": "array", - "items": { - "enum": [ - "post_title", - "post_content", - "post_excerpt" - ], - "type": "string" - }, - "required": false - }, - "slug": { - "description": "Limit result set to posts with one or more specific slugs.", - "type": "array", - "items": { - "type": "string" - }, - "required": false - }, - "status": { - "default": "publish", - "description": "Limit result set to posts assigned one or more statuses.", - "type": "array", - "items": { - "enum": [ - "publish", - "future", - "draft", - "pending", - "private", - "trash", - "auto-draft", - "inherit", - "request-pending", - "request-confirmed", - "request-failed", - "request-completed", - "any" - ], - "type": "string" - }, - "required": false - }, - "tax_relation": { - "description": "Limit result set based on relationship between multiple taxonomies.", - "type": "string", - "enum": [ - "AND", - "OR" - ], - "required": false - }, - "menus": { - "description": "Limit result set to items with specific terms assigned in the menus taxonomy.", - "type": [ - "object", - "array" - ], - "oneOf": [ - { - "title": "Term ID List", - "description": "Match terms with the listed IDs.", - "type": "array", - "items": { - "type": "integer" - } - }, - { - "title": "Term ID Taxonomy Query", - "description": "Perform an advanced term query.", - "type": "object", - "properties": { - "terms": { - "description": "Term IDs.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [] - }, - "operator": { - "description": "Whether items must be assigned all or any of the specified terms.", - "type": "string", - "enum": [ - "AND", - "OR" - ], - "default": "OR" - } - }, - "additionalProperties": false - } - ], - "required": false - }, - "menus_exclude": { - "description": "Limit result set to items except those with specific terms assigned in the menus taxonomy.", - "type": [ - "object", - "array" - ], - "oneOf": [ - { - "title": "Term ID List", - "description": "Match terms with the listed IDs.", - "type": "array", - "items": { - "type": "integer" - } - }, - { - "title": "Term ID Taxonomy Query", - "description": "Perform an advanced term query.", - "type": "object", - "properties": { - "terms": { - "description": "Term IDs.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [] - } - }, - "additionalProperties": false - } - ], - "required": false - }, - "menu_order": { - "description": "Limit result set to posts with a specific menu_order value.", - "type": "integer", - "required": false - } - } - }, - { - "methods": [ - "POST" - ], - "allow_batch": { - "v1": true - }, - "args": { - "title": { - "description": "The title for the object.", - "type": [ - "string", - "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 - }, - "type": { - "default": "custom", - "description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\".", - "type": "string", - "enum": [ - "taxonomy", - "post_type", - "post_type_archive", - "custom" - ], - "required": false - }, - "status": { - "default": "publish", - "description": "A named status for the object.", - "type": "string", - "enum": [ - "publish", - "future", - "draft", - "pending", - "private" - ], - "required": false - }, - "parent": { - "default": 0, - "description": "The ID for the parent of the object.", - "type": "integer", - "minimum": 0, - "required": false - }, - "attr_title": { - "description": "Text for the title attribute of the link element for this menu item.", - "type": "string", - "required": false - }, - "classes": { - "description": "Class names for the link element of this menu item.", - "type": "array", - "items": { - "type": "string" - }, - "required": false - }, - "description": { - "description": "The description of this menu item.", - "type": "string", - "required": false - }, - "menu_order": { - "default": 1, - "description": "The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0.", - "type": "integer", - "minimum": 1, - "required": false - }, - "object": { - "description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\".", - "type": "string", - "required": false - }, - "object_id": { - "default": 0, - "description": "The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories.", - "type": "integer", - "minimum": 0, - "required": false - }, - "target": { - "description": "The target attribute of the link element for this menu item.", - "type": "string", - "enum": [ - "_blank", - "" - ], - "required": false - }, - "url": { - "description": "The URL to which this menu item points.", - "type": "string", - "format": "uri", - "required": false - }, - "xfn": { - "description": "The XFN relationship expressed in the link of this menu item.", - "type": "array", - "items": { - "type": "string" - }, - "required": false - }, - "menus": { - "description": "The terms assigned to the object in the nav_menu taxonomy.", - "type": "integer", - "required": false - }, - "meta": { - "description": "Meta fields.", - "type": "object", - "properties": [], - "required": false - } - } - } - ], - "_links": { - "self": [ - { - "href": "http://example.org/index.php?rest_route=/wp/v2/menu-items" - } - ] - } - }, - "/wp/v2/menu-items/(?P[\\d]+)": { - "namespace": "wp/v2", - "methods": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE" - ], - "endpoints": [ - { - "methods": [ - "GET" - ], - "allow_batch": { - "v1": true - }, - "args": { - "id": { - "description": "Unique identifier for the post.", - "type": "integer", - "required": false - }, - "context": { - "description": "Scope under which the request is made; determines fields present in response.", - "type": "string", - "enum": [ - "view", - "embed", - "edit" - ], - "default": "view", - "required": false - } - } - }, - { - "methods": [ - "POST", - "PUT", - "PATCH" - ], - "allow_batch": { - "v1": true - }, - "args": { - "id": { - "description": "Unique identifier for the post.", - "type": "integer", - "required": false - }, - "title": { - "description": "The title for the object.", - "type": [ - "string", - "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 - }, - "type": { - "description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\".", - "type": "string", - "enum": [ - "taxonomy", - "post_type", - "post_type_archive", - "custom" - ], - "required": false - }, - "status": { - "description": "A named status for the object.", - "type": "string", - "enum": [ - "publish", - "future", - "draft", - "pending", - "private" - ], - "required": false - }, - "parent": { - "description": "The ID for the parent of the object.", - "type": "integer", - "minimum": 0, - "required": false - }, - "attr_title": { - "description": "Text for the title attribute of the link element for this menu item.", - "type": "string", - "required": false - }, - "classes": { - "description": "Class names for the link element of this menu item.", - "type": "array", - "items": { - "type": "string" - }, - "required": false - }, - "description": { - "description": "The description of this menu item.", - "type": "string", + "description": "The description of this menu item.", + "type": "string", "required": false }, "menu_order": { @@ -6674,90 +5914,271 @@ mockedApiResponse.Schema = { "type": "integer", "required": false }, - "order": { - "description": "Order sort attribute ascending or descending.", + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by post attribute.", + "type": "string", + "default": "date", + "enum": [ + "author", + "date", + "id", + "include", + "modified", + "parent", + "relevance", + "slug", + "include_slugs", + "title" + ], + "required": false + }, + "search_columns": { + "default": [], + "description": "Array of column names to be searched.", + "type": "array", + "items": { + "enum": [ + "post_title", + "post_content", + "post_excerpt" + ], + "type": "string" + }, + "required": false + }, + "slug": { + "description": "Limit result set to posts with one or more specific slugs.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "status": { + "default": "publish", + "description": "Limit result set to posts assigned one or more statuses.", + "type": "array", + "items": { + "enum": [ + "publish", + "future", + "draft", + "pending", + "private", + "trash", + "auto-draft", + "inherit", + "request-pending", + "request-confirmed", + "request-failed", + "request-completed", + "any" + ], + "type": "string" + }, + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "allow_batch": { + "v1": true + }, + "args": { + "date": { + "description": "The date the post was published, in the site's timezone.", + "type": [ + "string", + "null" + ], + "format": "date-time", + "required": false + }, + "date_gmt": { + "description": "The date the post was published, as GMT.", + "type": [ + "string", + "null" + ], + "format": "date-time", + "required": false + }, + "slug": { + "description": "An alphanumeric identifier for the post unique to its type.", + "type": "string", + "required": false + }, + "status": { + "description": "A named status for the post.", + "type": "string", + "enum": [ + "publish", + "future", + "draft", + "pending", + "private" + ], + "required": false + }, + "password": { + "description": "A password to protect access to the content and excerpt.", + "type": "string", + "required": false + }, + "title": { + "description": "The title for the post.", + "type": "object", + "properties": { + "raw": { + "description": "Title for the post, as it exists in the database.", + "type": "string", + "context": [ + "edit", + "embed" + ] + }, + "rendered": { + "description": "HTML title for the post, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false + }, + "content": { + "description": "The content for the post.", + "type": "object", + "properties": { + "raw": { + "description": "Content for the post, as it exists in the database.", + "type": "string", + "context": [ + "edit", + "embed" + ] + }, + "rendered": { + "description": "HTML content for the post, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + }, + "block_version": { + "description": "Version of the content block format used by the post.", + "type": "integer", + "context": [ + "edit", + "embed" + ], + "readonly": true + }, + "protected": { + "description": "Whether the content is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false + }, + "template": { + "description": "The theme file to use to display the post.", + "type": "string", + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "http://example.org/index.php?rest_route=/wp/v2/navigation" + } + ] + } + }, + "/wp/v2/navigation/(?P[\\d]+)": { + "namespace": "wp/v2", + "methods": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "allow_batch": { + "v1": true + }, + "args": { + "id": { + "description": "Unique identifier for the post.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", "type": "string", - "default": "desc", "enum": [ - "asc", - "desc" + "view", + "embed", + "edit" ], + "default": "view", "required": false }, - "orderby": { - "description": "Sort collection by post attribute.", + "password": { + "description": "The password for the post if it is password protected.", "type": "string", - "default": "date", - "enum": [ - "author", - "date", - "id", - "include", - "modified", - "parent", - "relevance", - "slug", - "include_slugs", - "title" - ], - "required": false - }, - "search_columns": { - "default": [], - "description": "Array of column names to be searched.", - "type": "array", - "items": { - "enum": [ - "post_title", - "post_content", - "post_excerpt" - ], - "type": "string" - }, - "required": false - }, - "slug": { - "description": "Limit result set to posts with one or more specific slugs.", - "type": "array", - "items": { - "type": "string" - }, - "required": false - }, - "status": { - "default": "publish", - "description": "Limit result set to posts assigned one or more statuses.", - "type": "array", - "items": { - "enum": [ - "publish", - "future", - "draft", - "pending", - "private", - "trash", - "auto-draft", - "inherit", - "request-pending", - "request-confirmed", - "request-failed", - "request-completed", - "any" - ], - "type": "string" - }, "required": false } } }, { "methods": [ - "POST" + "POST", + "PUT", + "PATCH" ], "allow_batch": { "v1": true }, "args": { + "id": { + "description": "Unique identifier for the post.", + "type": "integer", + "required": false + }, "date": { "description": "The date the post was published, in the site's timezone.", "type": [ @@ -6867,42 +6288,208 @@ mockedApiResponse.Schema = { }, "required": false }, - "template": { - "description": "The theme file to use to display the post.", - "type": "string", + "template": { + "description": "The theme file to use to display the post.", + "type": "string", + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "allow_batch": { + "v1": true + }, + "args": { + "id": { + "description": "Unique identifier for the post.", + "type": "integer", + "required": false + }, + "force": { + "type": "boolean", + "default": false, + "description": "Whether to bypass Trash and force deletion.", + "required": false + } + } + } + ] + }, + "/wp/v2/navigation/(?P[\\d]+)/revisions": { + "namespace": "wp/v2", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "parent": { + "description": "The ID for the parent of the revision.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "embed", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Limit results to those matching a string.", + "type": "string", + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "id", + "include", + "relevance", + "slug", + "include_slugs", + "title" + ], + "required": false + } + } + } + ] + }, + "/wp/v2/navigation/(?P[\\d]+)/revisions/(?P[\\d]+)": { + "namespace": "wp/v2", + "methods": [ + "GET", + "DELETE" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "parent": { + "description": "The ID for the parent of the revision.", + "type": "integer", + "required": false + }, + "id": { + "description": "Unique identifier for the revision.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "embed", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "parent": { + "description": "The ID for the parent of the revision.", + "type": "integer", + "required": false + }, + "id": { + "description": "Unique identifier for the revision.", + "type": "integer", + "required": false + }, + "force": { + "type": "boolean", + "default": false, + "description": "Required to be true, as revisions do not support trashing.", "required": false } } } - ], - "_links": { - "self": [ - { - "href": "http://example.org/index.php?rest_route=/wp/v2/navigation" - } - ] - } + ] }, - "/wp/v2/navigation/(?P[\\d]+)": { + "/wp/v2/navigation/(?P[\\d]+)/autosaves": { "namespace": "wp/v2", "methods": [ "GET", - "POST", - "PUT", - "PATCH", - "DELETE" + "POST" ], "endpoints": [ { "methods": [ "GET" ], - "allow_batch": { - "v1": true - }, "args": { - "id": { - "description": "Unique identifier for the post.", + "parent": { + "description": "The ID for the parent of the autosave.", "type": "integer", "required": false }, @@ -6916,26 +6503,16 @@ mockedApiResponse.Schema = { ], "default": "view", "required": false - }, - "password": { - "description": "The password for the post if it is password protected.", - "type": "string", - "required": false } } }, { "methods": [ - "POST", - "PUT", - "PATCH" + "POST" ], - "allow_batch": { - "v1": true - }, "args": { - "id": { - "description": "Unique identifier for the post.", + "parent": { + "description": "The ID for the parent of the autosave.", "type": "integer", "required": false }, @@ -7048,10 +6625,228 @@ mockedApiResponse.Schema = { }, "required": false }, - "template": { - "description": "The theme file to use to display the post.", - "type": "string", + "template": { + "description": "The theme file to use to display the post.", + "type": "string", + "required": false + } + } + } + ] + }, + "/wp/v2/navigation/(?P[\\d]+)/autosaves/(?P[\\d]+)": { + "namespace": "wp/v2", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "parent": { + "description": "The ID for the parent of the autosave.", + "type": "integer", + "required": false + }, + "id": { + "description": "The ID for the autosave.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "embed", + "edit" + ], + "default": "view", + "required": false + } + } + } + ] + }, + "/wp/v2/font-families": { + "namespace": "wp/v2", + "methods": [ + "GET", + "POST" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "embed", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by post attribute.", + "type": "string", + "default": "id", + "enum": [ + "id", + "include" + ], + "required": false + }, + "slug": { + "description": "Limit result set to posts with one or more specific slugs.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "theme_json_version": { + "description": "Version of the theme.json schema used for the typography settings.", + "type": "integer", + "default": 2, + "minimum": 2, + "maximum": 2, + "required": false + }, + "font_family_settings": { + "description": "font-family declaration in theme.json format, encoded as a string.", + "type": "string", + "required": true + } + } + } + ], + "_links": { + "self": [ + { + "href": "http://example.org/index.php?rest_route=/wp/v2/font-families" + } + ] + } + }, + "/wp/v2/font-families/(?P[\\d]+)": { + "namespace": "wp/v2", + "methods": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "id": { + "description": "Unique identifier for the post.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "embed", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "id": { + "description": "Unique identifier for the post.", + "type": "integer", + "required": false + }, + "theme_json_version": { + "description": "Version of the theme.json schema used for the typography settings.", + "type": "integer", + "default": 2, + "minimum": 2, + "maximum": 2, "required": false + }, + "font_family_settings": { + "description": "font-family declaration in theme.json format, encoded as a string.", + "type": "string", + "required": true } } }, @@ -7059,9 +6854,6 @@ mockedApiResponse.Schema = { "methods": [ "DELETE" ], - "allow_batch": { - "v1": true - }, "args": { "id": { "description": "Unique identifier for the post.", @@ -7078,10 +6870,11 @@ mockedApiResponse.Schema = { } ] }, - "/wp/v2/navigation/(?P[\\d]+)/revisions": { + "/wp/v2/font-families/(?P[\\d]+)/font-faces": { "namespace": "wp/v2", "methods": [ - "GET" + "GET", + "POST" ], "endpoints": [ { @@ -7089,10 +6882,10 @@ mockedApiResponse.Schema = { "GET" ], "args": { - "parent": { - "description": "The ID for the parent of the revision.", + "font_family_id": { + "description": "The ID for the parent font family of the font face.", "type": "integer", - "required": false + "required": true }, "context": { "description": "Scope under which the request is made; determines fields present in response.", @@ -7115,15 +6908,11 @@ mockedApiResponse.Schema = { "per_page": { "description": "Maximum number of items to be returned in result set.", "type": "integer", + "default": 10, "minimum": 1, "maximum": 100, "required": false }, - "search": { - "description": "Limit results to those matching a string.", - "type": "string", - "required": false - }, "exclude": { "description": "Ensure result set excludes specific IDs.", "type": "array", @@ -7158,25 +6947,45 @@ mockedApiResponse.Schema = { "required": false }, "orderby": { - "description": "Sort collection by object attribute.", + "description": "Sort collection by post attribute.", "type": "string", - "default": "date", + "default": "id", "enum": [ - "date", "id", - "include", - "relevance", - "slug", - "include_slugs", - "title" + "include" ], "required": false } } + }, + { + "methods": [ + "POST" + ], + "args": { + "font_family_id": { + "description": "The ID for the parent font family of the font face.", + "type": "integer", + "required": true + }, + "theme_json_version": { + "description": "Version of the theme.json schema used for the typography settings.", + "type": "integer", + "default": 2, + "minimum": 2, + "maximum": 2, + "required": false + }, + "font_face_settings": { + "description": "font-face declaration in theme.json format, encoded as a string.", + "type": "string", + "required": true + } + } } ] }, - "/wp/v2/navigation/(?P[\\d]+)/revisions/(?P[\\d]+)": { + "/wp/v2/font-families/(?P[\\d]+)/font-faces/(?P[\\d]+)": { "namespace": "wp/v2", "methods": [ "GET", @@ -7188,15 +6997,15 @@ mockedApiResponse.Schema = { "GET" ], "args": { - "parent": { - "description": "The ID for the parent of the revision.", + "font_family_id": { + "description": "The ID for the parent font family of the font face.", "type": "integer", - "required": false + "required": true }, "id": { - "description": "Unique identifier for the revision.", + "description": "Unique identifier for the font face.", "type": "integer", - "required": false + "required": true }, "context": { "description": "Scope under which the request is made; determines fields present in response.", @@ -7216,27 +7025,27 @@ mockedApiResponse.Schema = { "DELETE" ], "args": { - "parent": { - "description": "The ID for the parent of the revision.", + "font_family_id": { + "description": "The ID for the parent font family of the font face.", "type": "integer", - "required": false + "required": true }, "id": { - "description": "Unique identifier for the revision.", + "description": "Unique identifier for the font face.", "type": "integer", - "required": false + "required": true }, "force": { "type": "boolean", "default": false, - "description": "Required to be true, as revisions do not support trashing.", + "description": "Whether to bypass Trash and force deletion.", "required": false } } } ] }, - "/wp/v2/navigation/(?P[\\d]+)/autosaves": { + "/wp/v2/media": { "namespace": "wp/v2", "methods": [ "GET", @@ -7248,20 +7057,201 @@ mockedApiResponse.Schema = { "GET" ], "args": { - "parent": { - "description": "The ID for the parent of the autosave.", + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "embed", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Limit results to those matching a string.", + "type": "string", + "required": false + }, + "after": { + "description": "Limit response to posts published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_after": { + "description": "Limit response to posts modified after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "author": { + "description": "Limit result set to posts assigned to specific authors.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "author_exclude": { + "description": "Ensure result set excludes posts assigned to specific authors.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "before": { + "description": "Limit response to posts published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_before": { + "description": "Limit response to posts modified before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", "type": "integer", "required": false }, - "context": { - "description": "Scope under which the request is made; determines fields present in response.", + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by post attribute.", + "type": "string", + "default": "date", + "enum": [ + "author", + "date", + "id", + "include", + "modified", + "parent", + "relevance", + "slug", + "include_slugs", + "title" + ], + "required": false + }, + "parent": { + "description": "Limit result set to items with particular parent IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "parent_exclude": { + "description": "Limit result set to all items except those of a particular parent ID.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "search_columns": { + "default": [], + "description": "Array of column names to be searched.", + "type": "array", + "items": { + "enum": [ + "post_title", + "post_content", + "post_excerpt" + ], + "type": "string" + }, + "required": false + }, + "slug": { + "description": "Limit result set to posts with one or more specific slugs.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "status": { + "default": "inherit", + "description": "Limit result set to posts assigned one or more statuses.", + "type": "array", + "items": { + "enum": [ + "inherit", + "private", + "trash" + ], + "type": "string" + }, + "required": false + }, + "media_type": { + "default": null, + "description": "Limit result set to attachments of a particular media type.", "type": "string", "enum": [ - "view", - "embed", - "edit" + "image", + "video", + "text", + "application", + "audio" ], - "default": "view", + "required": false + }, + "mime_type": { + "default": null, + "description": "Limit result set to attachments of a particular MIME type.", + "type": "string", "required": false } } @@ -7271,11 +7261,6 @@ mockedApiResponse.Schema = { "POST" ], "args": { - "parent": { - "description": "The ID for the parent of the autosave.", - "type": "integer", - "required": false - }, "date": { "description": "The date the post was published, in the site's timezone.", "type": [ @@ -7311,11 +7296,6 @@ mockedApiResponse.Schema = { ], "required": false }, - "password": { - "description": "A password to protect access to the content and excerpt.", - "type": "string", - "required": false - }, "title": { "description": "The title for the post.", "type": "object", @@ -7324,8 +7304,7 @@ mockedApiResponse.Schema = { "description": "Title for the post, as it exists in the database.", "type": "string", "context": [ - "edit", - "embed" + "edit" ] }, "rendered": { @@ -7341,216 +7320,110 @@ mockedApiResponse.Schema = { }, "required": false }, - "content": { - "description": "The content for the post.", - "type": "object", - "properties": { - "raw": { - "description": "Content for the post, as it exists in the database.", - "type": "string", - "context": [ - "edit", - "embed" - ] - }, - "rendered": { - "description": "HTML content for the post, transformed for display.", - "type": "string", - "context": [ - "view", - "edit", - "embed" - ], - "readonly": true - }, - "block_version": { - "description": "Version of the content block format used by the post.", - "type": "integer", - "context": [ - "edit", - "embed" - ], - "readonly": true - }, - "protected": { - "description": "Whether the content is protected with a password.", - "type": "boolean", - "context": [ - "view", - "edit", - "embed" - ], - "readonly": true - } - }, - "required": false - }, - "template": { - "description": "The theme file to use to display the post.", - "type": "string", - "required": false - } - } - } - ] - }, - "/wp/v2/navigation/(?P[\\d]+)/autosaves/(?P[\\d]+)": { - "namespace": "wp/v2", - "methods": [ - "GET" - ], - "endpoints": [ - { - "methods": [ - "GET" - ], - "args": { - "parent": { - "description": "The ID for the parent of the autosave.", + "author": { + "description": "The ID for the author of the post.", "type": "integer", "required": false }, - "id": { - "description": "The ID for the autosave.", + "featured_media": { + "description": "The ID of the featured media for the post.", "type": "integer", "required": false }, - "context": { - "description": "Scope under which the request is made; determines fields present in response.", + "comment_status": { + "description": "Whether or not comments are open on the post.", "type": "string", "enum": [ - "view", - "embed", - "edit" + "open", + "closed" ], - "default": "view", "required": false - } - } - } - ] - }, - "/wp/v2/font-families": { - "namespace": "wp/v2", - "methods": [ - "GET", - "POST" - ], - "endpoints": [ - { - "methods": [ - "GET" - ], - "args": { - "context": { - "description": "Scope under which the request is made; determines fields present in response.", + }, + "ping_status": { + "description": "Whether or not the post can be pinged.", "type": "string", "enum": [ - "view", - "embed", - "edit" + "open", + "closed" ], - "default": "view", - "required": false - }, - "page": { - "description": "Current page of the collection.", - "type": "integer", - "default": 1, - "minimum": 1, - "required": false - }, - "per_page": { - "description": "Maximum number of items to be returned in result set.", - "type": "integer", - "default": 10, - "minimum": 1, - "maximum": 100, - "required": false - }, - "exclude": { - "description": "Ensure result set excludes specific IDs.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [], "required": false }, - "include": { - "description": "Limit result set to specific IDs.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [], + "meta": { + "description": "Meta fields.", + "type": "object", + "properties": [], "required": false }, - "offset": { - "description": "Offset the result set by a specific number of items.", - "type": "integer", + "template": { + "description": "The theme file to use to display the post.", + "type": "string", "required": false }, - "order": { - "description": "Order sort attribute ascending or descending.", + "alt_text": { + "description": "Alternative text to display when attachment is not displayed.", "type": "string", - "default": "desc", - "enum": [ - "asc", - "desc" - ], "required": false }, - "orderby": { - "description": "Sort collection by post attribute.", - "type": "string", - "default": "id", - "enum": [ - "id", - "include" - ], + "caption": { + "description": "The attachment caption.", + "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 }, - "slug": { - "description": "Limit result set to posts with one or more specific slugs.", - "type": "array", - "items": { - "type": "string" + "description": { + "description": "The attachment description.", + "type": "object", + "properties": { + "raw": { + "description": "Description for the attachment, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML description for the attachment, transformed for display.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + } }, "required": false - } - } - }, - { - "methods": [ - "POST" - ], - "args": { - "theme_json_version": { - "description": "Version of the theme.json schema used for the typography settings.", + }, + "post": { + "description": "The ID for the associated post of the attachment.", "type": "integer", - "default": 2, - "minimum": 2, - "maximum": 2, "required": false - }, - "font_family_settings": { - "description": "font-family declaration in theme.json format, encoded as a string.", - "type": "string", - "required": true } } } ], "_links": { - "self": [ - { - "href": "http://example.org/index.php?rest_route=/wp/v2/font-families" - } - ] + "self": "http://example.org/index.php?rest_route=/wp/v2/media" } }, - "/wp/v2/font-families/(?P[\\d]+)": { + "/wp/v2/media/(?P[\\d]+)": { "namespace": "wp/v2", "methods": [ "GET", @@ -7595,210 +7468,343 @@ mockedApiResponse.Schema = { "type": "integer", "required": false }, - "theme_json_version": { - "description": "Version of the theme.json schema used for the typography settings.", - "type": "integer", - "default": 2, - "minimum": 2, - "maximum": 2, + "date": { + "description": "The date the post was published, in the site's timezone.", + "type": [ + "string", + "null" + ], + "format": "date-time", "required": false }, - "font_family_settings": { - "description": "font-family declaration in theme.json format, encoded as a string.", - "type": "string", - "required": true - } - } - }, - { - "methods": [ - "DELETE" - ], - "args": { - "id": { - "description": "Unique identifier for the post.", - "type": "integer", + "date_gmt": { + "description": "The date the post was published, as GMT.", + "type": [ + "string", + "null" + ], + "format": "date-time", "required": false }, - "force": { - "type": "boolean", - "default": false, - "description": "Whether to bypass Trash and force deletion.", + "slug": { + "description": "An alphanumeric identifier for the post unique to its type.", + "type": "string", "required": false - } - } - } - ] - }, - "/wp/v2/font-families/(?P[\\d]+)/font-faces": { - "namespace": "wp/v2", - "methods": [ - "GET", - "POST" - ], - "endpoints": [ - { - "methods": [ - "GET" - ], - "args": { - "font_family_id": { - "description": "The ID for the parent font family of the font face.", - "type": "integer", - "required": true }, - "context": { - "description": "Scope under which the request is made; determines fields present in response.", + "status": { + "description": "A named status for the post.", "type": "string", "enum": [ - "view", - "embed", - "edit" + "publish", + "future", + "draft", + "pending", + "private" ], - "default": "view", - "required": false - }, - "page": { - "description": "Current page of the collection.", - "type": "integer", - "default": 1, - "minimum": 1, "required": false }, - "per_page": { - "description": "Maximum number of items to be returned in result set.", - "type": "integer", - "default": 10, - "minimum": 1, - "maximum": 100, - "required": false - }, - "exclude": { - "description": "Ensure result set excludes specific IDs.", - "type": "array", - "items": { - "type": "integer" + "title": { + "description": "The title for the post.", + "type": "object", + "properties": { + "raw": { + "description": "Title for the post, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML title for the post, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } }, - "default": [], "required": false }, - "include": { - "description": "Limit result set to specific IDs.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [], + "author": { + "description": "The ID for the author of the post.", + "type": "integer", "required": false }, - "offset": { - "description": "Offset the result set by a specific number of items.", + "featured_media": { + "description": "The ID of the featured media for the post.", "type": "integer", "required": false }, - "order": { - "description": "Order sort attribute ascending or descending.", + "comment_status": { + "description": "Whether or not comments are open on the post.", "type": "string", - "default": "desc", "enum": [ - "asc", - "desc" + "open", + "closed" ], "required": false }, - "orderby": { - "description": "Sort collection by post attribute.", + "ping_status": { + "description": "Whether or not the post can be pinged.", "type": "string", - "default": "id", "enum": [ - "id", - "include" + "open", + "closed" ], "required": false + }, + "meta": { + "description": "Meta fields.", + "type": "object", + "properties": [], + "required": false + }, + "template": { + "description": "The theme file to use to display the post.", + "type": "string", + "required": false + }, + "alt_text": { + "description": "Alternative text to display when attachment is not displayed.", + "type": "string", + "required": false + }, + "caption": { + "description": "The attachment caption.", + "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": { + "description": "The attachment description.", + "type": "object", + "properties": { + "raw": { + "description": "Description for the attachment, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML description for the attachment, transformed for display.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + } + }, + "required": false + }, + "post": { + "description": "The ID for the associated post of the attachment.", + "type": "integer", + "required": false } } }, { "methods": [ - "POST" + "DELETE" ], "args": { - "font_family_id": { - "description": "The ID for the parent font family of the font face.", - "type": "integer", - "required": true - }, - "theme_json_version": { - "description": "Version of the theme.json schema used for the typography settings.", + "id": { + "description": "Unique identifier for the post.", "type": "integer", - "default": 2, - "minimum": 2, - "maximum": 2, "required": false }, - "font_face_settings": { - "description": "font-face declaration in theme.json format, encoded as a string.", - "type": "string", - "required": true + "force": { + "type": "boolean", + "default": false, + "description": "Whether to bypass Trash and force deletion.", + "required": false } } } ] }, - "/wp/v2/font-families/(?P[\\d]+)/font-faces/(?P[\\d]+)": { + "/wp/v2/media/(?P[\\d]+)/post-process": { "namespace": "wp/v2", "methods": [ - "GET", - "DELETE" + "POST" ], "endpoints": [ { "methods": [ - "GET" + "POST" ], "args": { - "font_family_id": { - "description": "The ID for the parent font family of the font face.", - "type": "integer", - "required": true - }, "id": { - "description": "Unique identifier for the font face.", + "description": "Unique identifier for the attachment.", "type": "integer", - "required": true + "required": false }, - "context": { - "description": "Scope under which the request is made; determines fields present in response.", + "action": { "type": "string", "enum": [ - "view", - "embed", - "edit" + "create-image-subsizes" ], - "default": "view", - "required": false + "required": true } } - }, + } + ] + }, + "/wp/v2/media/(?P[\\d]+)/edit": { + "namespace": "wp/v2", + "methods": [ + "POST" + ], + "endpoints": [ { "methods": [ - "DELETE" + "POST" ], "args": { - "font_family_id": { - "description": "The ID for the parent font family of the font face.", - "type": "integer", + "src": { + "description": "URL to the edited image file.", + "type": "string", + "format": "uri", "required": true }, - "id": { - "description": "Unique identifier for the font face.", + "modifiers": { + "description": "Array of image edits.", + "type": "array", + "minItems": 1, + "items": { + "description": "Image edit.", + "type": "object", + "required": [ + "type", + "args" + ], + "oneOf": [ + { + "title": "Rotation", + "properties": { + "type": { + "description": "Rotation type.", + "type": "string", + "enum": [ + "rotate" + ] + }, + "args": { + "description": "Rotation arguments.", + "type": "object", + "required": [ + "angle" + ], + "properties": { + "angle": { + "description": "Angle to rotate clockwise in degrees.", + "type": "number" + } + } + } + } + }, + { + "title": "Crop", + "properties": { + "type": { + "description": "Crop type.", + "type": "string", + "enum": [ + "crop" + ] + }, + "args": { + "description": "Crop arguments.", + "type": "object", + "required": [ + "left", + "top", + "width", + "height" + ], + "properties": { + "left": { + "description": "Horizontal position from the left to begin the crop as a percentage of the image width.", + "type": "number" + }, + "top": { + "description": "Vertical position from the top to begin the crop as a percentage of the image height.", + "type": "number" + }, + "width": { + "description": "Width of the crop as a percentage of the image width.", + "type": "number" + }, + "height": { + "description": "Height of the crop as a percentage of the image height.", + "type": "number" + } + } + } + } + } + ] + }, + "required": false + }, + "rotation": { + "description": "The amount to rotate the image clockwise in degrees. DEPRECATED: Use `modifiers` instead.", "type": "integer", - "required": true + "minimum": 0, + "exclusiveMinimum": true, + "maximum": 360, + "exclusiveMaximum": true, + "required": false }, - "force": { - "type": "boolean", - "default": false, - "description": "Whether to bypass Trash and force deletion.", + "x": { + "description": "As a percentage of the image, the x position to start the crop from. DEPRECATED: Use `modifiers` instead.", + "type": "number", + "minimum": 0, + "maximum": 100, + "required": false + }, + "y": { + "description": "As a percentage of the image, the y position to start the crop from. DEPRECATED: Use `modifiers` instead.", + "type": "number", + "minimum": 0, + "maximum": 100, + "required": false + }, + "width": { + "description": "As a percentage of the image, the width to crop the image to. DEPRECATED: Use `modifiers` instead.", + "type": "number", + "minimum": 0, + "maximum": 100, + "required": false + }, + "height": { + "description": "As a percentage of the image, the height to crop the image to. DEPRECATED: Use `modifiers` instead.", + "type": "number", + "minimum": 0, + "maximum": 100, "required": false } } @@ -9169,14 +9175,14 @@ mockedApiResponse.Schema = { "enum": { "post": "post", "page": "page", - "attachment": "attachment", "nav_menu_item": "nav_menu_item", "wp_block": "wp_block", "wp_template": "wp_template", "wp_template_part": "wp_template_part", "wp_navigation": "wp_navigation", "wp_font_family": "wp_font_family", - "wp_font_face": "wp_font_face" + "wp_font_face": "wp_font_face", + "attachment": "attachment" } }, "required": false @@ -12877,36 +12883,6 @@ mockedApiResponse.TypesCollection = { ] } }, - "attachment": { - "description": "", - "hierarchical": false, - "has_archive": false, - "name": "Media", - "slug": "attachment", - "icon": "dashicons-admin-media", - "taxonomies": [], - "rest_base": "media", - "rest_namespace": "wp/v2", - "_links": { - "collection": [ - { - "href": "http://example.org/index.php?rest_route=/wp/v2/types" - } - ], - "wp:items": [ - { - "href": "http://example.org/index.php?rest_route=/wp/v2/media" - } - ], - "curies": [ - { - "name": "wp", - "href": "https://api.w.org/{rel}", - "templated": true - } - ] - } - }, "nav_menu_item": { "description": "", "hierarchical": false, @@ -13120,6 +13096,36 @@ mockedApiResponse.TypesCollection = { } ] } + }, + "attachment": { + "description": "", + "hierarchical": false, + "has_archive": false, + "name": "Media", + "slug": "attachment", + "icon": "dashicons-admin-media", + "taxonomies": [], + "rest_base": "media", + "rest_namespace": "wp/v2", + "_links": { + "collection": [ + { + "href": "http://example.org/index.php?rest_route=/wp/v2/types" + } + ], + "wp:items": [ + { + "href": "http://example.org/index.php?rest_route=/wp/v2/media" + } + ], + "curies": [ + { + "name": "wp", + "href": "https://api.w.org/{rel}", + "templated": true + } + ] + } } };