Skip to content

Commit

Permalink
Add missing block/theme json $schema property (WordPress#57201)
Browse files Browse the repository at this point in the history
* Add missing block.json $schema properties

* Add missing theme.json $schema

* Fix schema violations for phpunit fixtures
  • Loading branch information
sirreal authored Dec 21, 2023
1 parent 90c9ab3 commit 5f4c7fe
Show file tree
Hide file tree
Showing 35 changed files with 37 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/theme.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"settings": {
"appearanceTools": false,
Expand Down
1 change: 1 addition & 0 deletions packages/e2e-tests/plugins/iframed-block/block.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "test/iframed-block",
"title": "Iframed Block",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "test/iframed-inline-styles",
"title": "Iframed Inline Styles",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "test/iframed-masonry-block",
"title": "Iframed Masonry Block",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "test/iframed-multiple-stylesheets",
"title": "Iframed Multiple Stylesheets",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "test/directive-bind",
"title": "E2E Interactivity tests - directive bind",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "test/directive-body",
"title": "E2E Interactivity tests - directive body",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "test/directive-class",
"title": "E2E Interactivity tests - directive class",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "test/directive-context",
"title": "E2E Interactivity tests - directive context",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "test/directive-init",
"title": "E2E Interactivity tests - directive init",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "test/directive-key",
"title": "E2E Interactivity tests - directive key",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "test/directive-on",
"title": "E2E Interactivity tests - directive on",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "test/directive-priorities",
"title": "E2E Interactivity tests - directive priorities",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "test/directive-slots",
"title": "E2E Interactivity tests - directive slots",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "test/directive-style",
"title": "E2E Interactivity tests - directive style",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "test/directive-text",
"title": "E2E Interactivity tests - directive text",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "test/directive-watch",
"title": "E2E Interactivity tests - directive watch",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "test/negation-operator",
"title": "E2E Interactivity tests - negation operator",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "test/router-navigate",
"title": "E2E Interactivity tests - router navigate",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "test/router-regions",
"title": "E2E Interactivity tests - router regions",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "test/store-tag",
"title": "E2E Interactivity tests - store tag",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "test/tovdom-islands",
"title": "E2E Interactivity tests - tovdom islands",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "test/tovdom",
"title": "E2E Interactivity tests - tovdom",
Expand Down
1 change: 1 addition & 0 deletions packages/edit-widgets/src/blocks/widget-area/block.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"name": "core/widget-area",
"category": "widgets",
"attributes": {
Expand Down
1 change: 1 addition & 0 deletions packages/widgets/src/blocks/legacy-widget/block.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/legacy-widget",
"title": "Legacy Widget",
Expand Down
1 change: 1 addition & 0 deletions packages/widgets/src/blocks/widget-group/block.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/widget-group",
"category": "widgets",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"settings": {
"appearanceTools": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"settings": {
"appearanceTools": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"settings": {
"appearanceTools": true,
Expand Down
1 change: 1 addition & 0 deletions phpunit/data/themedir1/block-theme-child/theme.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"settings": {
"color": {
Expand Down
1 change: 1 addition & 0 deletions phpunit/data/themedir1/block-theme/theme.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"settings": {
"color": {
Expand Down
1 change: 1 addition & 0 deletions phpunit/data/themedir1/fonts-block-theme/theme.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"settings": {
"appearanceTools": true,
Expand Down
3 changes: 2 additions & 1 deletion phpunit/fixtures/block.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "my-plugin/notice",
"title": "Notice",
Expand All @@ -11,7 +12,7 @@
"icon": "star",
"description": "Shows warning, error or success notices…",
"keywords": [ "alert", "message" ],
"textDomain": "my-plugin",
"textdomain": "my-plugin",
"attributes": {
"message": {
"type": "string",
Expand Down
2 changes: 2 additions & 0 deletions phpunit/fixtures/hooked-block/block.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"title": "Hooked Block",
"name": "tests/hooked-block",
"blockHooks": {
"tests/group-first-child": "firstChild",
Expand Down
1 change: 1 addition & 0 deletions test/gutenberg-test-themes/style-variations/theme.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"styles": {
"color": {
Expand Down

0 comments on commit 5f4c7fe

Please sign in to comment.