Skip to content

fix(vue-vuetify): resolve a $ref on propertyNames in the additional-properties nested form#2603

Open
KiaraGrouwstra wants to merge 1 commit into
eclipsesource:masterfrom
KiaraGrouwstra:fix-additional-properties-ref
Open

fix(vue-vuetify): resolve a $ref on propertyNames in the additional-properties nested form#2603
KiaraGrouwstra wants to merge 1 commit into
eclipsesource:masterfrom
KiaraGrouwstra:fix-additional-properties-ref

Conversation

@KiaraGrouwstra

Copy link
Copy Markdown

Resolve a $ref on @vue-vuetify additionalProperties' propertyNames against the root schema (control.value.rootSchema, via Resolve.schema) before spreading it into the nested form's schema.
Further add a test verifying these are resolved with this change.

The additional-properties (map) renderer builds the nested new-key form's schema by spreading control.value.schema.propertyNames. When propertyNames is a $ref into the root's $defs (the shape a schema that shares a named key type across many maps emits), the nested <json-forms> mounts it as its own root, where #/$defs/... does not exist. AJV then throws can't resolve reference #/$defs/... from id # and the map fails to render.

Disclaimer: I used a coding agent in the creation of this patch.

…yNames`

The `additional-properties` (map) renderer builds the nested new-key form's
schema by spreading `control.value.schema.propertyNames`. When
`propertyNames` is a `$ref` into the root's `$defs` (the shape a schema
that shares a named key type across many maps emits), the nested
`json-forms` mounts it as its OWN root, where `#/$defs/...` does not
exist. AJV then throws `can't resolve reference #/$defs/... from id #`
and the map fails to render.

Resolve the `$ref` against the real root schema (`control.value.rootSchema`,
via `Resolve.schema` -- the same accessor the renderer already uses for the
additional-properties value schema) before spreading, so the nested form
gets a self-contained subschema.

Adds a regression test mounting such a map and asserting the mount does not
throw (`tests/unit/additional/AdditionalPropertiesRef.spec.ts`).

Assisted-by: Claude:claude-opus-4-8

Signed-off-by: Kiara Grouwstra <kiara.grouwstra@gmail.com>
@netlify

netlify Bot commented Jul 19, 2026

Copy link
Copy Markdown

Deploy Preview for jsonforms-examples ready!

Name Link
🔨 Latest commit cb832b3
🔍 Latest deploy log https://app.netlify.com/projects/jsonforms-examples/deploys/6a5cce30f16140000893d109
😎 Deploy Preview https://deploy-preview-2603--jsonforms-examples.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@KiaraGrouwstra
KiaraGrouwstra marked this pull request as ready for review July 19, 2026 13:54
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 83.776%. remained the same — KiaraGrouwstra:fix-additional-properties-ref into eclipsesource:master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants