Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update schema version #62802

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/class-wp-rest-global-styles-controller-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ public function get_item_schema() {
}

$schema = array(
'$schema' => 'http://json-schema.org/draft-04/schema#',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we can update the controller schemas. The code for validating REST API schemas only supports draft-04.

Let's just stick with the code in schemas.

'$schema' => 'http://json-schema.org/draft-07/schema#',
'title' => $this->post_type,
'type' => 'object',
'properties' => array(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function get_item_schema() {
}

$schema = array(
'$schema' => 'http://json-schema.org/draft-04/schema#',
'$schema' => 'http://json-schema.org/draft-07/schema#',
'title' => "{$this->parent_post_type}-revision",
'type' => 'object',
// Base properties for every Revision.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public function get_item_schema() {
}

$schema = array(
'$schema' => 'http://json-schema.org/draft-04/schema#',
'$schema' => 'http://json-schema.org/draft-07/schema#',
'title' => 'font-collection',
'type' => 'object',
'properties' => array(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ public function get_item_schema() {
}

$schema = array(
'$schema' => 'http://json-schema.org/draft-04/schema#',
'$schema' => 'http://json-schema.org/draft-07/schema#',
'title' => $this->post_type,
'type' => 'object',
// Base properties for every Post.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public function get_item_schema() {
}

$schema = array(
'$schema' => 'http://json-schema.org/draft-04/schema#',
'$schema' => 'http://json-schema.org/draft-07/schema#',
'title' => $this->post_type,
'type' => 'object',
// Base properties for every Post.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function get_item_schema() {
}

$schema = array(
'$schema' => 'http://json-schema.org/draft-04/schema#',
'$schema' => 'http://json-schema.org/draft-07/schema#',
'title' => 'block-editor-settings-item',
'type' => 'object',
'properties' => array(
Expand Down
2 changes: 1 addition & 1 deletion schemas/json/block.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "JSON schema for WordPress blocks",
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"//": {
"reference": "https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/",
Expand Down
2 changes: 1 addition & 1 deletion schemas/json/font-collection.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "JSON schema for WordPress Font Collections",
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"definitions": {
"fontFace": {
Expand Down
8 changes: 3 additions & 5 deletions schemas/json/theme.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "JSON schema for WordPress block theme global settings and styles",
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"//": {
"explainer": "https://developer.wordpress.org/themes/advanced-topics/theme-json/",
Expand Down Expand Up @@ -468,8 +468,7 @@
"increment": {
"description": "The amount to increment each step by.",
"type": "number",
"exclusiveMinimum": true,
"minimum": 0,
"exclusiveMinimum": 0,
"default": 1.5
},
"steps": {
Expand All @@ -482,8 +481,7 @@
"mediumStep": {
"description": "The value to medium setting in the scale.",
"type": "number",
"exclusiveMinimum": true,
"minimum": 0,
"exclusiveMinimum": 0,
"default": 1.5
},
"unit": {
Expand Down
2 changes: 1 addition & 1 deletion schemas/json/wp-env.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "JSON schema for WordPress wp-env configuration files",
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"//": {
"reference": "https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/"
Expand Down
Loading