#60255 closed defect (bug) (fixed)
Add $schema property to block and theme JSON files
Reported by: | jonsurrell | Owned by: | jonsurrell |
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch has-unit-tests commit add-to-field-guide |
Focuses: | Cc: |
Description
Add $schema to block.json and theme.json files to leverage JSON schema support.
Schemas help ensure that these files conform to expectations. They can help provide autocomplete and documentation if editors are configured to do so.
We provide and maintain these schemas, we should be using them. This can help to ensure that our own declarations are correct and that the schemas are also correct.
Change History (12)
This ticket was mentioned in PR #5868 on WordPress/wordpress-develop by @jonsurrell.
8 months ago
#1
- Keywords has-patch has-unit-tests added
8 months ago
#2
https://github.com/WordPress/wordpress-develop/actions/runs/7529540433/job/20493970875?pr=5868
Files in src/wp-includes/blocks
are synced from npm packages so they will get updated next time WordPress packages get updated.
@jonsurrell commented on PR #5868:
8 months ago
#3
Good to know, thanks! I reverted the changes to src/wp-includes/blocks
.
8 months ago
#4
@sirreal it looks like some of these should come over through the normal package update process? do you know if this is true?
@jonsurrell commented on PR #5868:
8 months ago
#5
src/wp-includes/blocks
changes should be updated automatically (https://github.com/WordPress/wordpress-develop/pull/5868#issuecomment-1892189866) - I had changed those files but reverted the changes.
@Bernhard Reiter commented on PR #5868:
8 months ago
#7
I've taken the liberty of slightly tweaking the test hooked blocks' names in https://github.com/WordPress/wordpress-develop/pull/5868/commits/126b31bf0dc64ae3f8a017bb015346f92ea9a739. Hope that's okay! 😊
@jonsurrell commented on PR #5868:
8 months ago
#8
Looks good, thanks @ockham.
@Bernhard Reiter commented on PR #5868:
8 months ago
#11
Committed to Core in https://core.trac.wordpress.org/changeset/57336.
Add $schema to block.json and theme.json files.
This is a port of https://github.com/WordPress/gutenberg/pull/57201
Trac ticket: https://core.trac.wordpress.org/ticket/60255