Consume versioned JSON-Schema editor catalog - #2197
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
kpal81xd
force-pushed
the
refactor/schema-json-catalog
branch
from
August 10, 2026 13:43
caef0f7 to
2a37c32
Compare
kpal81xd
force-pushed
the
refactor/schema-json-catalog
branch
from
August 10, 2026 13:55
2a37c32 to
c308ed2
Compare
Read the schema catalog as a versioned (version: 1) JSON-Schema tree for asset/scene/settings/component schemas, replacing the previous $-prefixed shape. Nodes now use standard JSON-Schema keywords (type, properties, items, additionalProperties, enum, default, minItems/maxItems, anyOf) plus x-editor-type / x-merge-method / x-scope / x-open-map extensions. - editor-api/schema*: read the JSON-Schema shape and map metadata to x-* keys - inspector, components menu, templates, clipboard: updated to the new shape - fix: AssetsSchema.resolvePath deep-copies a field's default instead of returning a live reference into the shared catalog (matches ComponentSchema.resolvePath); prevents catalog corruption via mutation - fix: schema:material:getType falls back to 'string' (with a warning) for an unresolved path instead of returning null
The JSON-Schema catalog refactor dropped @param/@returns/@example on the AssetsSchema, ComponentSchema, SceneSchema and SettingsSchema public methods whose signatures were unchanged. Restore them to match the current signatures. Docs only, no behaviour change.
kpal81xd
force-pushed
the
refactor/schema-json-catalog
branch
from
August 14, 2026 10:30
680dd38 to
da84e15
Compare
kpal81xd
force-pushed
the
refactor/schema-json-catalog
branch
from
August 14, 2026 13:35
da84e15 to
0737deb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the schema API to consume a versioned (
version: 1) JSON-Schema catalog for asset / scene / settings / component schemas, replacing the previous$-prefixed schema shape. Schema nodes now use standard JSON-Schema keywords (type,properties,items,additionalProperties,enum,default,minItems/maxItems,anyOffor nullability) plusx-editor-type/x-merge-method/x-scope/x-open-mapextensions.Changes
editor-api/schema*— read the JSON-Schema catalog shape (type, default, enum, exact length, nullability viaanyOf) and map metadata to thex-*extension keys.Schemanow fail-fasts on a non-version: 1payload.AssetsSchema.resolvePathnow returns a deep copy of a field'sdefaultinstead of a live reference into the shared catalog. Previously a consumer that mutated the returned default (e.g. on an unset→set edit) could corrupt the schema default for the rest of the session. This matches the existing behaviour ofComponentSchema.resolvePath.schema:material:getTypefalls back to'string'(with a warning) for an unresolved path instead of returningnull, restoring the priorgetTypeForPathbehaviour, and resolves the path once instead of twice.Testing
npm run test:api— 202/202 passingnpm test— 176/176 passingnpm run build— cleannpm run lint— 0 errorsnpm run typecheck— no new errors introduced (project baseline unchanged)The default-aliasing fix and the
getTypefallback were additionally verified end-to-end in a running editor: the unpatched resolve path shares a reference into the live catalog, the patched wrapper returns an independent copy each call, and mutating the returned default no longer affects the catalog.