[wp-trac] [WordPress Trac] #50615: Editor: Create standalone JSON schema for block type definition
WordPress Trac
noreply at wordpress.org
Wed Jul 15 03:49:01 UTC 2020
#50615: Editor: Create standalone JSON schema for block type definition
-----------------------------+------------------------------
Reporter: gziolo | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version:
Severity: normal | Resolution:
Keywords: | Focuses: rest-api
-----------------------------+------------------------------
Comment (by schlessera):
I think it should probably be something shipped with Core, to properly
version the schema in accordance with the Core version in use. Otherwise,
you'd need to have an argument to version the API endpoint requests with,
and you'd need to always update the API endpoint during the development
cycle of Core if changes are needed.
The important bit is that it shouldn't be logic you need to execute within
the runtime context of WordPress, but rather static information you can
just read even if WordPress is not running, like a static JSON file.
It could be something like `wp-includes/blocks/schema.json`, for example.
I know that `wp-includes` would generally be considered PHP includes, but
there are already JSON files in the `wp-includes/blocks` subfolders that
set a precedent.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50615#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list