Skip to content

fix(@vue-vuetify): reuse the parent AJV#2602

Open
KiaraGrouwstra wants to merge 2 commits into
eclipsesource:masterfrom
KiaraGrouwstra:reuse-ajv
Open

fix(@vue-vuetify): reuse the parent AJV#2602
KiaraGrouwstra wants to merge 2 commits into
eclipsesource:masterfrom
KiaraGrouwstra:reuse-ajv

Conversation

@KiaraGrouwstra

@KiaraGrouwstra KiaraGrouwstra commented Jul 19, 2026

Copy link
Copy Markdown

Reuse the same AJV instance in @vue-vuetify.
Ensures that user configuration of AJV is retained.

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

@netlify

netlify Bot commented Jul 19, 2026

Copy link
Copy Markdown

Deploy Preview for jsonforms-examples ready!

Name Link
🔨 Latest commit f734784
🔍 Latest deploy log https://app.netlify.com/projects/jsonforms-examples/deploys/6a5decb4bcd59a0008db8398
😎 Deploy Preview https://deploy-preview-2602--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.

@CLAassistant

CLAassistant commented Jul 19, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@KiaraGrouwstra
KiaraGrouwstra marked this pull request as draft July 19, 2026 12:38
@KiaraGrouwstra
KiaraGrouwstra force-pushed the reuse-ajv branch 2 times, most recently from 13b618d to 90a7ff6 Compare July 19, 2026 12:54
@KiaraGrouwstra KiaraGrouwstra changed the title fix(packages): reuse the parent AJV fix(@vue-vuetify): reuse the parent AJV Jul 19, 2026
@KiaraGrouwstra
KiaraGrouwstra marked this pull request as ready for review July 19, 2026 12:58
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 83.78% (+0.004%) from 83.776% — KiaraGrouwstra:reuse-ajv into eclipsesource:master

@lucas-koehler lucas-koehler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @KiaraGrouwstra ,
thank you very much for contributing to JSON Forms ❤️
I had a look at the change and I don't think it makes a difference:
useJsonForms() of the vue package already injects the JSON Forms core state. Its ajv property should be the same ajv as injected by useAjv(). See useAjvs code here:

export function useAjv(): Ajv;
export function useAjv(optional: true): Ajv | undefined;
export function useAjv(optional?: true) {
const jsonforms = optional === true ? useJsonForms(true) : useJsonForms();
if (!optional && (!jsonforms?.core || !jsonforms.core.ajv)) {
throw new Error(
"'jsonforms ajv' couldn't be injected. Are you within JSON Forms?"
);
}
return jsonforms?.core?.ajv as Ajv;
}

Am I missing something that makes this change necessary?

KiaraGrouwstra and others added 2 commits July 20, 2026 11:38
…m's AJV

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

Signed-off-by: Kiara Grouwstra <kiara.grouwstra@gmail.com>
Reuse the same AJV instance throughout JSONForms.
Ensures that user configuration of AJV is retained.

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

Copy link
Copy Markdown
Author

Hi @lucas-koehler, thanks for your response!
I added a test demonstrating the underlying issue now.

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.

4 participants