diff --git a/tests/qunit/fixtures/wp-api-generated.js b/tests/qunit/fixtures/wp-api-generated.js index d212facf26006..56c76cf99ed79 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": "", @@ -2707,7 +2701,7 @@ mockedApiResponse.Schema = { } ] }, - "/wp/v2/menu-items": { + "/wp/v2/media": { "namespace": "wp/v2", "methods": [ "GET", @@ -2718,9 +2712,6 @@ mockedApiResponse.Schema = { "methods": [ "GET" ], - "allow_batch": { - "v1": true - }, "args": { "context": { "description": "Scope under which the request is made; determines fields present in response.", @@ -2743,7 +2734,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 @@ -2765,6 +2756,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", @@ -2803,7 +2812,7 @@ mockedApiResponse.Schema = { "order": { "description": "Order sort attribute ascending or descending.", "type": "string", - "default": "asc", + "default": "desc", "enum": [ "asc", "desc" @@ -2811,9 +2820,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", @@ -2824,11 +2833,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.", @@ -2852,118 +2878,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 } } @@ -2972,26 +2916,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", @@ -3003,121 +2976,105 @@ 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 + }, + "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.", + "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" - }, - "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.", + "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", @@ -3131,9 +3088,6 @@ mockedApiResponse.Schema = { "methods": [ "GET" ], - "allow_batch": { - "v1": true - }, "args": { "id": { "description": "Unique identifier for the post.", @@ -3159,31 +3113,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", @@ -3195,102 +3178,95 @@ 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 + }, + "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.", + "post": { + "description": "The ID for the associated post of the attachment.", "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.", - "type": "integer", - "required": false - }, - "meta": { - "description": "Meta fields.", - "type": "object", - "properties": [], "required": false } } @@ -3299,9 +3275,6 @@ mockedApiResponse.Schema = { "methods": [ "DELETE" ], - "allow_batch": { - "v1": true - }, "args": { "id": { "description": "Unique identifier for the post.", @@ -3318,207 +3291,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", - "" - ], + "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 }, - "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", - "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", @@ -3554,7 +3493,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 @@ -3614,7 +3553,7 @@ mockedApiResponse.Schema = { "order": { "description": "Order sort attribute ascending or descending.", "type": "string", - "default": "desc", + "default": "asc", "enum": [ "asc", "desc" @@ -3622,9 +3561,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", @@ -3635,7 +3574,8 @@ mockedApiResponse.Schema = { "relevance", "slug", "include_slugs", - "title" + "title", + "menu_order" ], "required": false }, @@ -3694,8 +3634,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" @@ -3737,8 +3677,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" @@ -3770,6 +3710,11 @@ mockedApiResponse.Schema = { } ], "required": false + }, + "menu_order": { + "description": "Limit result set to posts with a specific menu_order value.", + "type": "integer", + "required": false } } }, @@ -3781,31 +3726,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", @@ -3816,87 +3778,97 @@ 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.", - "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": { + "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 }, - "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": { + "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": "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 } } } ], "_links": { - "self": "http://example.org/index.php?rest_route=/wp/v2/blocks" - } - }, - "/wp/v2/blocks/(?P[\\d]+)": { - "namespace": "wp/v2", + "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", @@ -3928,11 +3900,6 @@ mockedApiResponse.Schema = { ], "default": "view", "required": false - }, - "password": { - "description": "The password for the post if it is password protected.", - "type": "string", - "required": false } } }, @@ -3951,31 +3918,46 @@ 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", - "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", @@ -3986,77 +3968,80 @@ mockedApiResponse.Schema = { ], "required": false }, - "password": { - "description": "A password to protect access to the content and excerpt.", + "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 }, - "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 } } }, @@ -4083,10 +4068,11 @@ mockedApiResponse.Schema = { } ] }, - "/wp/v2/blocks/(?P[\\d]+)/revisions": { + "/wp/v2/menu-items/(?P[\\d]+)/autosaves": { "namespace": "wp/v2", "methods": [ - "GET" + "GET", + "POST" ], "endpoints": [ { @@ -4095,7 +4081,7 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "description": "The ID for the parent of the revision.", + "description": "The ID for the parent of the autosave.", "type": "integer", "required": false }, @@ -4109,83 +4095,147 @@ mockedApiResponse.Schema = { ], "default": "view", "required": false - }, - "page": { - "description": "Current page of the collection.", + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "parent": { + "description": "The ID for the parent of the object.", "type": "integer", - "default": 1, - "minimum": 1, + "minimum": 0, "required": false }, - "per_page": { - "description": "Maximum number of items to be returned in result set.", - "type": "integer", - "minimum": 1, - "maximum": 100, + "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 }, - "search": { - "description": "Limit results to those matching a string.", + "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 }, - "exclude": { - "description": "Ensure result set excludes specific IDs.", - "type": "array", - "items": { - "type": "integer" - }, - "default": [], + "status": { + "description": "A named status for the object.", + "type": "string", + "enum": [ + "publish", + "future", + "draft", + "pending", + "private" + ], "required": false }, - "include": { - "description": "Limit result set to specific IDs.", - "type": "array", - "items": { - "type": "integer" + "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" }, - "default": [], "required": false }, - "offset": { - "description": "Offset the result set by a specific number of items.", + "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 }, - "order": { - "description": "Order sort attribute ascending or descending.", + "object": { + "description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\".", "type": "string", - "default": "desc", - "enum": [ - "asc", - "desc" - ], "required": false }, - "orderby": { - "description": "Sort collection by object attribute.", + "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", - "default": "date", "enum": [ - "date", - "id", - "include", - "relevance", - "slug", - "include_slugs", - "title" + "_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/blocks/(?P[\\d]+)/revisions/(?P[\\d]+)": { + "/wp/v2/menu-items/(?P[\\d]+)/autosaves/(?P[\\d]+)": { "namespace": "wp/v2", "methods": [ - "GET", - "DELETE" + "GET" ], "endpoints": [ { @@ -4194,12 +4244,12 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "description": "The ID for the parent of the revision.", + "description": "The ID for the parent of the autosave.", "type": "integer", "required": false }, "id": { - "description": "Unique identifier for the revision.", + "description": "The ID for the autosave.", "type": "integer", "required": false }, @@ -4215,33 +4265,10 @@ mockedApiResponse.Schema = { "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": { + "/wp/v2/blocks": { "namespace": "wp/v2", "methods": [ "GET", @@ -4252,12 +4279,10 @@ mockedApiResponse.Schema = { "methods": [ "GET" ], + "allow_batch": { + "v1": true + }, "args": { - "parent": { - "description": "The ID for the parent of the autosave.", - "type": "integer", - "required": false - }, "context": { "description": "Scope under which the request is made; determines fields present in response.", "type": "string", @@ -4268,534 +4293,232 @@ mockedApiResponse.Schema = { ], "default": "view", "required": false - } - } - }, - { - "methods": [ - "POST" - ], - "args": { - "parent": { - "description": "The ID for the parent of the autosave.", + }, + "page": { + "description": "Current page of the collection.", "type": "integer", + "default": 1, + "minimum": 1, "required": false }, - "date": { - "description": "The date the post was published, in the site's timezone.", - "type": [ - "string", - "null" - ], - "format": "date-time", + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, "required": false }, - "date_gmt": { - "description": "The date the post was published, as GMT.", - "type": [ - "string", - "null" - ], + "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 }, - "slug": { - "description": "An alphanumeric identifier for the post unique to its type.", + "modified_after": { + "description": "Limit response to posts modified after a given ISO8601 compliant date.", "type": "string", + "format": "date-time", "required": false }, - "status": { - "description": "A named status for the post.", + "before": { + "description": "Limit response to posts published before a given ISO8601 compliant date.", "type": "string", - "enum": [ - "publish", - "future", - "draft", - "pending", - "private" - ], + "format": "date-time", "required": false }, - "password": { - "description": "A password to protect access to the content and excerpt.", + "modified_before": { + "description": "Limit response to posts modified before a given ISO8601 compliant date.", "type": "string", + "format": "date-time", "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" - ] - } + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" }, + "default": [], "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 - } + "include": { + "description": "Limit result set to specific IDs.", + "type": "array", + "items": { + "type": "integer" }, + "default": [], "required": false }, - "meta": { - "description": "Meta fields.", - "type": "object", - "properties": [], + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", "required": false }, - "template": { - "description": "The theme file to use to display the post.", + "order": { + "description": "Order sort attribute ascending or descending.", "type": "string", - "required": false - }, - "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": [ - "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" - ], + "default": "desc", + "enum": [ + "asc", + "desc" + ], "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/templates/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions/(?P[\\d]+)": { - "namespace": "wp/v2", - "methods": [ - "GET", - "DELETE" - ], - "endpoints": [ - { - "methods": [ - "GET" - ], - "args": { - "parent": { - "description": "The id of a template", - "type": "string", - "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 of a template", - "type": "string", - "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%-]+)/autosaves": { - "namespace": "wp/v2", - "methods": [ - "GET", - "POST" - ], - "endpoints": [ - { - "methods": [ - "GET" - ], - "args": { - "id": { - "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 - } - } - }, - { - "methods": [ - "POST" - ], - "args": { - "id": { - "description": "The id of a template", - "type": "string", - "required": false - }, - "slug": { - "description": "Unique slug identifying the template.", - "type": "string", - "minLength": 1, - "pattern": "[a-zA-Z0-9_\\%-]+", - "required": false - }, - "theme": { - "description": "Theme identifier for the template.", - "type": "string", - "required": false - }, - "type": { - "description": "Type of template.", - "type": "string", - "required": false - }, - "content": { - "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 - } + "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 }, - "title": { - "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 - } + "slug": { + "description": "Limit result set to posts with one or more specific slugs.", + "type": "array", + "items": { + "type": "string" }, "required": false }, - "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 - } - } - } - ] - }, - "/wp/v2/templates/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves/(?P[\\d]+)": { - "namespace": "wp/v2", - "methods": [ - "GET" - ], - "endpoints": [ - { - "methods": [ - "GET" - ], - "args": { - "parent": { - "description": "The id of a template", - "type": "string", - "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": { - "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 - }, - "wp_id": { - "description": "Limit to the specified post id.", - "type": "integer", + "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 }, - "area": { - "description": "Limit to the specified template part area.", + "tax_relation": { + "description": "Limit result set based on relationship between multiple taxonomies.", "type": "string", + "enum": [ + "AND", + "OR" + ], "required": false }, - "post_type": { - "description": "Post type to get the templates for.", - "type": "string", + "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 + }, + "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 + } + ], "required": false } } @@ -4804,154 +4527,125 @@ 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.", + "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": true + "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": { - "default": "", - "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": { - "default": "", - "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", "embed" ], "readonly": true - } - }, - "required": false - }, - "description": { - "default": "", - "description": "Description of template.", - "type": "string", - "required": false - }, - "status": { - "default": "publish", - "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 - } - } - } - ], - "_links": { - "self": [ - { - "href": "http://example.org/index.php?rest_route=/wp/v2/templates" - } - ] - } - }, - "/wp/v2/templates/lookup": { - "namespace": "wp/v2", - "methods": [ - "GET" - ], - "endpoints": [ - { - "methods": [ - "GET" - ], - "args": { - "slug": { - "description": "The slug of the template to get the fallback for", - "type": "string", - "required": true + } + }, + "required": false }, - "is_custom": { - "description": "Indicates if a template is custom or part of the template hierarchy", - "type": "boolean", + "meta": { + "description": "Meta fields.", + "type": "object", + "properties": [], "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`", + "template": { + "description": "The theme file to use to display the post.", "type": "string", "required": false + }, + "wp_pattern_category": { + "description": "The terms assigned to the post in the wp_pattern_category taxonomy.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false } } } ], "_links": { - "self": [ - { - "href": "http://example.org/index.php?rest_route=/wp/v2/templates/lookup" - } - ] + "self": "http://example.org/index.php?rest_route=/wp/v2/blocks" } }, - "/wp/v2/templates/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": { + "/wp/v2/blocks/(?P[\\d]+)": { "namespace": "wp/v2", "methods": [ "GET", @@ -4965,10 +4659,13 @@ mockedApiResponse.Schema = { "methods": [ "GET" ], + "allow_batch": { + "v1": true + }, "args": { "id": { - "description": "The id of a template", - "type": "string", + "description": "Unique identifier for the post.", + "type": "integer", "required": false }, "context": { @@ -4981,6 +4678,11 @@ mockedApiResponse.Schema = { ], "default": "view", "required": false + }, + "password": { + "description": "The password for the post if it is password protected.", + "type": "string", + "required": false } } }, @@ -4990,74 +4692,93 @@ mockedApiResponse.Schema = { "PUT", "PATCH" ], + "allow_batch": { + "v1": true + }, "args": { "id": { - "description": "The id of a template", - "type": "string", + "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", "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", @@ -5068,26 +4789,23 @@ 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 } } @@ -5096,10 +4814,13 @@ mockedApiResponse.Schema = { "methods": [ "DELETE" ], + "allow_batch": { + "v1": true + }, "args": { "id": { - "description": "The id of a template", - "type": "string", + "description": "Unique identifier for the post.", + "type": "integer", "required": false }, "force": { @@ -5112,7 +4833,7 @@ mockedApiResponse.Schema = { } ] }, - "/wp/v2/template-parts/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions": { + "/wp/v2/blocks/(?P[\\d]+)/revisions": { "namespace": "wp/v2", "methods": [ "GET" @@ -5124,8 +4845,8 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "description": "The id of a template", - "type": "string", + "description": "The ID for the parent of the revision.", + "type": "integer", "required": false }, "context": { @@ -5210,7 +4931,7 @@ mockedApiResponse.Schema = { } ] }, - "/wp/v2/template-parts/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions/(?P[\\d]+)": { + "/wp/v2/blocks/(?P[\\d]+)/revisions/(?P[\\d]+)": { "namespace": "wp/v2", "methods": [ "GET", @@ -5223,8 +4944,8 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "description": "The id of a template", - "type": "string", + "description": "The ID for the parent of the revision.", + "type": "integer", "required": false }, "id": { @@ -5251,8 +4972,8 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "description": "The id of a template", - "type": "string", + "description": "The ID for the parent of the revision.", + "type": "integer", "required": false }, "id": { @@ -5270,7 +4991,7 @@ mockedApiResponse.Schema = { } ] }, - "/wp/v2/template-parts/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves": { + "/wp/v2/blocks/(?P[\\d]+)/autosaves": { "namespace": "wp/v2", "methods": [ "GET", @@ -5282,9 +5003,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": { @@ -5305,37 +5026,72 @@ mockedApiResponse.Schema = { "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 }, + "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" + ] + } + }, + "required": false + }, "content": { - "description": "Content of template.", - "type": [ - "object", - "string" - ], + "description": "The content for the post.", + "type": "object", "properties": { "raw": { - "description": "Content for the template, as it exists in the database.", + "description": "Content for the post, as it exists in the database.", "type": "string", "context": [ "view", @@ -5343,35 +5099,16 @@ mockedApiResponse.Schema = { ] }, "block_version": { - "description": "Version of the content block format used by the template.", + "description": "Version of the content block format used by the post.", "type": "integer", "context": [ "edit" ], "readonly": true - } - }, - "required": false - }, - "title": { - "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", + "protected": { + "description": "Whether the content is protected with a password.", + "type": "boolean", "context": [ "view", "edit", @@ -5382,38 +5119,30 @@ 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", "required": false }, - "area": { - "description": "Where the template part is intended for use (header, footer, etc.)", - "type": "string", + "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/template-parts/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves/(?P[\\d]+)": { + "/wp/v2/blocks/(?P[\\d]+)/autosaves/(?P[\\d]+)": { "namespace": "wp/v2", "methods": [ "GET" @@ -5425,8 +5154,8 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "description": "The id of a template", - "type": "string", + "description": "The ID for the parent of the autosave.", + "type": "integer", "required": false }, "id": { @@ -5449,11 +5178,10 @@ mockedApiResponse.Schema = { } ] }, - "/wp/v2/template-parts": { + "/wp/v2/templates/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions": { "namespace": "wp/v2", "methods": [ - "GET", - "POST" + "GET" ], "endpoints": [ { @@ -5461,6 +5189,11 @@ mockedApiResponse.Schema = { "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", @@ -5472,187 +5205,142 @@ 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", - "required": false - }, - "area": { - "description": "Where the template part is intended for use (header, footer, etc.)", + "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/template-parts" - } - ] - } + ] }, - "/wp/v2/template-parts/lookup": { + "/wp/v2/templates/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions/(?P[\\d]+)": { "namespace": "wp/v2", "methods": [ - "GET" + "GET", + "DELETE" ], "endpoints": [ { "methods": [ - "GET" + "GET" + ], + "args": { + "parent": { + "description": "The id of a template", + "type": "string", + "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": { - "slug": { - "description": "The slug of the template to get the fallback for", + "parent": { + "description": "The id of a template", "type": "string", - "required": true + "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`", - "type": "string", + "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/template-parts/lookup" - } - ] - } + ] }, - "/wp/v2/template-parts/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": { + "/wp/v2/templates/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves": { "namespace": "wp/v2", "methods": [ "GET", - "POST", - "PUT", - "PATCH", - "DELETE" + "POST" ], "endpoints": [ { @@ -5680,9 +5368,7 @@ mockedApiResponse.Schema = { }, { "methods": [ - "POST", - "PUT", - "PATCH" + "POST" ], "args": { "id": { @@ -5783,35 +5469,48 @@ 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/templates/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves/(?P[\\d]+)": { + "namespace": "wp/v2", + "methods": [ + "GET" + ], + "endpoints": [ { "methods": [ - "DELETE" + "GET" ], "args": { - "id": { + "parent": { "description": "The id of a template", "type": "string", "required": false }, - "force": { - "type": "boolean", - "default": false, - "description": "Whether to bypass Trash and force deletion.", + "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/navigation": { + "/wp/v2/templates": { "namespace": "wp/v2", "methods": [ "GET", @@ -5822,9 +5521,6 @@ mockedApiResponse.Schema = { "methods": [ "GET" ], - "allow_batch": { - "v1": true - }, "args": { "context": { "description": "Scope under which the request is made; determines fields present in response.", @@ -5837,236 +5533,91 @@ mockedApiResponse.Schema = { "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 - }, - "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.", + "wp_id": { + "description": "Limit to the specified post id.", "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.", + "area": { + "description": "Limit to the specified template part area.", "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", + "post_type": { + "description": "Post type to get the templates for.", + "type": "string", "required": false - }, + } + } + }, + { + "methods": [ + "POST" + ], + "args": { "slug": { - "description": "An alphanumeric identifier for the post unique to its type.", + "description": "Unique slug identifying the template.", "type": "string", - "required": false + "minLength": 1, + "pattern": "[a-zA-Z0-9_\\%-]+", + "required": true }, - "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": { + "default": "", + "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": { + "default": "", + "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", @@ -6074,32 +5625,32 @@ 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": { + "default": "", + "description": "Description of template.", + "type": "string", + "required": false + }, + "status": { + "default": "publish", + "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 } } @@ -6108,12 +5659,49 @@ mockedApiResponse.Schema = { "_links": { "self": [ { - "href": "http://example.org/index.php?rest_route=/wp/v2/navigation" + "href": "http://example.org/index.php?rest_route=/wp/v2/templates" } ] } }, - "/wp/v2/navigation/(?P[\\d]+)": { + "/wp/v2/templates/lookup": { + "namespace": "wp/v2", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "slug": { + "description": "The slug of the template to get the fallback for", + "type": "string", + "required": true + }, + "is_custom": { + "description": "Indicates if a template is custom or part of the template hierarchy", + "type": "boolean", + "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`", + "type": "string", + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "http://example.org/index.php?rest_route=/wp/v2/templates/lookup" + } + ] + } + }, + "/wp/v2/templates/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": { "namespace": "wp/v2", "methods": [ "GET", @@ -6127,13 +5715,10 @@ mockedApiResponse.Schema = { "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": { @@ -6146,11 +5731,6 @@ mockedApiResponse.Schema = { ], "default": "view", "required": false - }, - "password": { - "description": "The password for the post if it is password protected.", - "type": "string", - "required": false } } }, @@ -6160,114 +5740,74 @@ 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.", - "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.", - "type": "string", - "context": [ - "edit", - "embed" - ] - }, - "rendered": { - "description": "HTML content for the post, transformed for display.", + "raw": { + "description": "Title for the template, as it exists in the database.", "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", + "rendered": { + "description": "HTML title for the template, transformed for display.", + "type": "string", "context": [ "view", "edit", @@ -6278,10 +5818,27 @@ mockedApiResponse.Schema = { }, "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 } } }, @@ -6289,13 +5846,10 @@ mockedApiResponse.Schema = { "methods": [ "DELETE" ], - "allow_batch": { - "v1": true - }, "args": { "id": { - "description": "Unique identifier for the post.", - "type": "integer", + "description": "The id of a template", + "type": "string", "required": false }, "force": { @@ -6308,7 +5862,7 @@ mockedApiResponse.Schema = { } ] }, - "/wp/v2/navigation/(?P[\\d]+)/revisions": { + "/wp/v2/template-parts/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions": { "namespace": "wp/v2", "methods": [ "GET" @@ -6320,8 +5874,8 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "description": "The ID for the parent of the revision.", - "type": "integer", + "description": "The id of a template", + "type": "string", "required": false }, "context": { @@ -6406,11 +5960,213 @@ mockedApiResponse.Schema = { } ] }, - "/wp/v2/navigation/(?P[\\d]+)/revisions/(?P[\\d]+)": { + "/wp/v2/template-parts/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/revisions/(?P[\\d]+)": { + "namespace": "wp/v2", + "methods": [ + "GET", + "DELETE" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "parent": { + "description": "The id of a template", + "type": "string", + "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 of a template", + "type": "string", + "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/template-parts/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)/autosaves": { + "namespace": "wp/v2", + "methods": [ + "GET", + "POST" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "id": { + "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 + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "id": { + "description": "The id of a template", + "type": "string", + "required": false + }, + "slug": { + "description": "Unique slug identifying the template.", + "type": "string", + "minLength": 1, + "pattern": "[a-zA-Z0-9_\\%-]+", + "required": false + }, + "theme": { + "description": "Theme identifier for the template.", + "type": "string", + "required": false + }, + "type": { + "description": "Type of template.", + "type": "string", + "required": false + }, + "content": { + "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 + } + }, + "required": false + }, + "title": { + "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 + } + }, + "required": false + }, + "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", - "DELETE" + "GET" ], "endpoints": [ { @@ -6419,12 +6175,12 @@ mockedApiResponse.Schema = { ], "args": { "parent": { - "description": "The ID for the parent of the revision.", - "type": "integer", + "description": "The id of a template", + "type": "string", "required": false }, "id": { - "description": "Unique identifier for the revision.", + "description": "The ID for the autosave.", "type": "integer", "required": false }, @@ -6440,33 +6196,10 @@ mockedApiResponse.Schema = { "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/navigation/(?P[\\d]+)/autosaves": { + "/wp/v2/template-parts": { "namespace": "wp/v2", "methods": [ "GET", @@ -6478,11 +6211,6 @@ mockedApiResponse.Schema = { "GET" ], "args": { - "parent": { - "description": "The ID for the parent of the autosave.", - "type": "integer", - "required": false - }, "context": { "description": "Scope under which the request is made; determines fields present in response.", "type": "string", @@ -6493,6 +6221,21 @@ mockedApiResponse.Schema = { ], "default": "view", "required": false + }, + "wp_id": { + "description": "Limit to the specified post id.", + "type": "integer", + "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 } } }, @@ -6501,36 +6244,89 @@ mockedApiResponse.Schema = { "POST" ], "args": { - "parent": { - "description": "The ID for the parent of the autosave.", - "type": "integer", + "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 }, - "date": { - "description": "The date the post was published, in the site's timezone.", + "type": { + "description": "Type of template.", + "type": "string", + "required": false + }, + "content": { + "default": "", + "description": "Content of template.", "type": [ - "string", - "null" + "object", + "string" ], - "format": "date-time", + "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 + } + }, "required": false }, - "date_gmt": { - "description": "The date the post was published, as GMT.", + "title": { + "default": "", + "description": "Title of template.", "type": [ - "string", - "null" + "object", + "string" ], - "format": "date-time", + "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 + } + }, "required": false }, - "slug": { - "description": "An alphanumeric identifier for the post unique to its type.", + "description": { + "default": "", + "description": "Description of template.", "type": "string", "required": false }, "status": { - "description": "A named status for the post.", + "default": "publish", + "description": "Status of template.", "type": "string", "enum": [ "publish", @@ -6541,50 +6337,170 @@ mockedApiResponse.Schema = { ], "required": false }, - "password": { - "description": "A password to protect access to the content and excerpt.", + "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 + } + } + } + ], + "_links": { + "self": [ + { + "href": "http://example.org/index.php?rest_route=/wp/v2/template-parts" + } + ] + } + }, + "/wp/v2/template-parts/lookup": { + "namespace": "wp/v2", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "slug": { + "description": "The slug of the template to get the fallback for", + "type": "string", + "required": true + }, + "is_custom": { + "description": "Indicates if a template is custom or part of the template hierarchy", + "type": "boolean", + "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`", + "type": "string", + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "http://example.org/index.php?rest_route=/wp/v2/template-parts/lookup" + } + ] + } + }, + "/wp/v2/template-parts/(?P([^\\/:<>\\*\\?\"\\|]+(?:\\/[^\\/:<>\\*\\?\"\\|]+)?)[\\/\\w%-]+)": { + "namespace": "wp/v2", + "methods": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "id": { + "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 + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "id": { + "description": "The id of a template", + "type": "string", + "required": false + }, + "slug": { + "description": "Unique slug identifying the template.", + "type": "string", + "minLength": 1, + "pattern": "[a-zA-Z0-9_\\%-]+", + "required": false + }, + "theme": { + "description": "Theme identifier for the template.", + "type": "string", + "required": false + }, + "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", @@ -6592,75 +6508,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/media": { + "/wp/v2/navigation": { "namespace": "wp/v2", "methods": [ "GET", @@ -6671,6 +6572,9 @@ mockedApiResponse.Schema = { "methods": [ "GET" ], + "allow_batch": { + "v1": true + }, "args": { "context": { "description": "Scope under which the request is made; determines fields present in response.", @@ -6715,24 +6619,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", @@ -6796,76 +6682,223 @@ mockedApiResponse.Schema = { ], "required": false }, - "parent": { - "description": "Limit result set to items with particular parent IDs.", + "search_columns": { + "default": [], + "description": "Array of column names to be searched.", "type": "array", "items": { - "type": "integer" + "enum": [ + "post_title", + "post_content", + "post_excerpt" + ], + "type": "string" }, - "default": [], "required": false }, - "parent_exclude": { - "description": "Limit result set to all items except those of a particular parent ID.", + "slug": { + "description": "Limit result set to posts with one or more specific slugs.", "type": "array", "items": { - "type": "integer" + "type": "string" }, - "default": [], "required": false }, - "search_columns": { - "default": [], - "description": "Array of column names to be searched.", + "status": { + "default": "publish", + "description": "Limit result set to posts assigned one or more statuses.", "type": "array", "items": { "enum": [ - "post_title", - "post_content", - "post_excerpt" + "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 }, - "slug": { - "description": "Limit result set to posts with one or more specific slugs.", - "type": "array", - "items": { - "type": "string" + "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 }, - "status": { - "default": "inherit", - "description": "Limit result set to posts assigned one or more statuses.", - "type": "array", - "items": { - "enum": [ - "inherit", - "private", - "trash" - ], - "type": "string" - }, + "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 }, - "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" ], + "default": "view", "required": false }, - "mime_type": { - "default": null, - "description": "Limit result set to attachments of a particular MIME type.", + "password": { + "description": "The password for the post if it is password protected.", "type": "string", "required": false } @@ -6873,9 +6906,19 @@ mockedApiResponse.Schema = { }, { "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": [ @@ -6911,6 +6954,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", @@ -6919,7 +6967,8 @@ mockedApiResponse.Schema = { "description": "Title for the post, as it exists in the database.", "type": "string", "context": [ - "edit" + "edit", + "embed" ] }, "rendered": { @@ -6935,112 +6984,243 @@ 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 + } + } + }, + { + "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 }, - "comment_status": { - "description": "Whether or not comments are open on the post.", + "order": { + "description": "Order sort attribute ascending or descending.", "type": "string", + "default": "desc", "enum": [ - "open", - "closed" + "asc", + "desc" ], "required": false }, - "ping_status": { - "description": "Whether or not the post can be pinged.", + "orderby": { + "description": "Sort collection by object attribute.", "type": "string", + "default": "date", "enum": [ - "open", - "closed" + "date", + "id", + "include", + "relevance", + "slug", + "include_slugs", + "title" ], "required": false - }, - "meta": { - "description": "Meta fields.", - "type": "object", - "properties": [], + } + } + } + ] + }, + "/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 }, - "template": { - "description": "The theme file to use to display the post.", - "type": "string", + "id": { + "description": "Unique identifier for the revision.", + "type": "integer", "required": false }, - "alt_text": { - "description": "Alternative text to display when attachment is not displayed.", + "context": { + "description": "Scope under which the request is made; determines fields present in response.", "type": "string", + "enum": [ + "view", + "embed", + "edit" + ], + "default": "view", "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 - } - }, + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "parent": { + "description": "The ID for the parent of the revision.", + "type": "integer", "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 - } - }, + "id": { + "description": "Unique identifier for the revision.", + "type": "integer", "required": false }, - "post": { - "description": "The ID for the associated post of the attachment.", - "type": "integer", + "force": { + "type": "boolean", + "default": false, + "description": "Required to be true, as revisions do not support trashing.", "required": false } } } - ], - "_links": { - "self": "http://example.org/index.php?rest_route=/wp/v2/media" - } + ] }, - "/wp/v2/media/(?P[\\d]+)": { + "/wp/v2/navigation/(?P[\\d]+)/autosaves": { "namespace": "wp/v2", "methods": [ "GET", - "POST", - "PUT", - "PATCH", - "DELETE" + "POST" ], "endpoints": [ { @@ -7048,8 +7228,8 @@ mockedApiResponse.Schema = { "GET" ], "args": { - "id": { - "description": "Unique identifier for the post.", + "parent": { + "description": "The ID for the parent of the autosave.", "type": "integer", "required": false }, @@ -7068,13 +7248,11 @@ mockedApiResponse.Schema = { }, { "methods": [ - "POST", - "PUT", - "PATCH" + "POST" ], "args": { - "id": { - "description": "Unique identifier for the post.", + "parent": { + "description": "The ID for the parent of the autosave.", "type": "integer", "required": false }, @@ -7113,6 +7291,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", @@ -7121,7 +7304,8 @@ mockedApiResponse.Schema = { "description": "Title for the post, as it exists in the database.", "type": "string", "context": [ - "edit" + "edit", + "embed" ] }, "rendered": { @@ -7137,58 +7321,20 @@ mockedApiResponse.Schema = { }, "required": false }, - "author": { - "description": "The ID for the author of the post.", - "type": "integer", - "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" - ], - "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.", + "content": { + "description": "The content for the post.", "type": "object", "properties": { "raw": { - "description": "Caption for the attachment, as it exists in the database.", + "description": "Content for the post, as it exists in the database.", "type": "string", "context": [ - "edit" + "edit", + "embed" ] }, "rendered": { - "description": "HTML caption for the attachment, transformed for display.", + "description": "HTML content for the post, transformed for display.", "type": "string", "context": [ "view", @@ -7196,220 +7342,68 @@ mockedApiResponse.Schema = { "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", + }, + "block_version": { + "description": "Version of the content block format used by the post.", + "type": "integer", "context": [ - "edit" - ] + "edit", + "embed" + ], + "readonly": true }, - "rendered": { - "description": "HTML description for the attachment, transformed for display.", - "type": "string", + "protected": { + "description": "Whether the content is protected with a password.", + "type": "boolean", "context": [ "view", - "edit" + "edit", + "embed" ], "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.", + "template": { + "description": "The theme file to use to display the post.", + "type": "string", "required": false } } } ] }, - "/wp/v2/media/(?P[\\d]+)/post-process": { + "/wp/v2/navigation/(?P[\\d]+)/autosaves/(?P[\\d]+)": { "namespace": "wp/v2", "methods": [ - "POST" + "GET" ], "endpoints": [ { "methods": [ - "POST" + "GET" ], "args": { + "parent": { + "description": "The ID for the parent of the autosave.", + "type": "integer", + "required": false + }, "id": { - "description": "Unique identifier for the attachment.", + "description": "The ID for the autosave.", "type": "integer", "required": false }, - "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 - } - } - } - ] - }, - "/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, + "default": "view", "required": false } } @@ -8780,12 +8774,12 @@ 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", - "attachment": "attachment" + "wp_navigation": "wp_navigation" } }, "required": false @@ -9816,7 +9810,6 @@ mockedApiResponse.Schema = { "page", "category", "post_tag", - "wp_pattern_category", "any" ], "type": "string" @@ -12352,6 +12345,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, @@ -12505,36 +12528,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 - } - ] - } } };