Skip to content

Commit

Permalink
Fix type object in other schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
ajlende committed Jul 16, 2024
1 parent cc3b128 commit 704d8ae
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
28 changes: 14 additions & 14 deletions schemas/json/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@
}
},
"supports": {
"type": "object",
"description": "It contains as set of options to control features used in the editor. See the supports documentation at https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/ for more details.",
"type": "object",
"properties": {
"anchor": {
"type": "boolean",
Expand Down Expand Up @@ -269,8 +269,8 @@
"default": true
},
"color": {
"type": "object",
"description": "This value signals that a block supports some of the properties related to color. When it does, the block editor will show UI controls for the user to set their values.\n\nNote that the background and text keys have a default value of true, so if the color property is present they’ll also be considered enabled",
"type": "object",
"properties": {
"background": {
"type": "boolean",
Expand Down Expand Up @@ -315,8 +315,8 @@
"default": true
},
"dimensions": {
"type": "object",
"description": "This value signals that a block supports some of the CSS style properties related to dimensions. When it does, the block editor will show UI controls for the user to set their values if the theme declares support.\n\nWhen the block declares support for a specific dimensions property, its attributes definition is extended to include the style attribute.",
"type": "object",
"properties": {
"aspectRatio": {
"type": "boolean",
Expand All @@ -331,8 +331,8 @@
}
},
"filter": {
"type": "object",
"description": "This value signals that a block supports some of the properties related to filters. When it does, the block editor will show UI controls for the user to set their values if the theme declares support.\n\nWhen the block declares support for a specific filter property, its attributes definition is extended to include the style attribute.",
"type": "object",
"properties": {
"duotone": {
"type": "boolean",
Expand All @@ -342,8 +342,8 @@
}
},
"background": {
"type": "object",
"description": "This value signals that a block supports some of the CSS style properties related to background. When it does, the block editor will show UI controls for the user to set their values if the theme declares support.\n\nWhen the block declares support for a specific background property, its attributes definition is extended to include the style attribute.",
"type": "object",
"properties": {
"backgroundImage": {
"type": "boolean",
Expand Down Expand Up @@ -381,8 +381,8 @@
"type": "object",
"properties": {
"default": {
"type": "object",
"description": "Allows setting the `type` property to define what layout type is default for the block, and also default values for any properties inherent to that layout type, e.g., for a `flex` layout, a default value can be set for `flexWrap`.",
"type": "object",
"properties": {
"type": {
"type": "string",
Expand Down Expand Up @@ -503,8 +503,8 @@
"default": true
},
"position": {
"type": "object",
"description": "This value signals that a block supports some of the CSS style properties related to position. When it does, the block editor will show UI controls for the user to set their values if the theme declares support.\n\nWhen the block declares support for a specific position property, its attributes definition is extended to include the style attribute.",
"type": "object",
"properties": {
"sticky": {
"type": "boolean",
Expand All @@ -514,8 +514,8 @@
}
},
"spacing": {
"type": "object",
"description": "This value signals that a block supports some of the CSS style properties related to spacing. When it does, the block editor will show UI controls for the user to set their values if the theme declares support.\n\nWhen the block declares support for a specific spacing property, its attributes definition is extended to include the style attribute.",
"type": "object",
"properties": {
"margin": {
"oneOf": [
Expand Down Expand Up @@ -585,8 +585,8 @@
]
},
"typography": {
"type": "object",
"description": "This value signals that a block supports some of the CSS style properties related to typography. When it does, the block editor will show UI controls for the user to set their values if the theme declares support.\n\nWhen the block declares support for a specific typography property, its attributes definition is extended to include the style attribute.",
"type": "object",
"properties": {
"fontSize": {
"type": "boolean",
Expand Down Expand Up @@ -650,8 +650,8 @@
"additionalProperties": true
},
"selectors": {
"type": "object",
"description": "Provides custom CSS selectors and mappings for the block. Selectors may be set for the block itself or per-feature e.g. typography. Custom selectors per feature or sub-feature, allow different block styles to be applied to different elements within the block.",
"type": "object",
"properties": {
"root": {
"type": "string",
Expand Down Expand Up @@ -770,8 +770,8 @@
}
},
"example": {
"type": "object",
"description": "It provides structured example data for the block. This data is used to construct a preview for the block to be shown in the Inspector Help Panel when the user mouses over the block.\n\nSee the example documentation at https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/#example-optional for more details.",
"type": "object",
"properties": {
"viewportWidth": {
"type": "number",
Expand Down Expand Up @@ -908,8 +908,6 @@
"description": "An array of block variations.",
"items": {
"type": "object",
"required": [ "name", "title" ],
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
Expand Down Expand Up @@ -987,7 +985,9 @@
},
"description": "The list of attributes that should be compared. Each attributes will be matched and the variation will be active if all of them are matching."
}
}
},
"required": [ "name", "title" ],
"additionalProperties": false
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion schemas/json/font-collection.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"title": "JSON schema for WordPress Font Collections",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"definitions": {
"fontFace": {
"description": "Font face settings, with added preview property.",
Expand Down Expand Up @@ -95,6 +94,7 @@
"additionalProperties": false
}
},
"type": "object",
"properties": {
"$schema": {
"description": "JSON schema URI for font-collection.json.",
Expand Down
4 changes: 3 additions & 1 deletion schemas/json/wp-env.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"reference": "https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/"
},
"wpEnvProperties": {
"type": "object",
"properties": {
"core": {
"description": "The WordPress installation to use. If null is specified, wp-env will use the latest production release of WordPress.",
Expand Down Expand Up @@ -76,12 +77,12 @@
]
}
},
"type": "object",
"allOf": [
{
"$ref": "#/definitions/wpEnvProperties"
},
{
"type": "object",
"properties": {
"$schema": {
"type": "string"
Expand All @@ -107,6 +108,7 @@
}
},
{
"type": "object",
"propertyNames": {
"anyOf": [
{
Expand Down

0 comments on commit 704d8ae

Please sign in to comment.