Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[json] Add/remove json schema associations from extension at runtime #197035

Closed
rvost opened this issue Oct 30, 2023 · 1 comment
Closed

[json] Add/remove json schema associations from extension at runtime #197035

rvost opened this issue Oct 30, 2023 · 1 comment
Assignees

Comments

@rvost
Copy link

rvost commented Oct 30, 2023

I'm developing a small extension that relies on built-in JSON language features. My extension monitors changes to the file that looks like following:

{
  "configs": ["file1.json", "file2.json"]
  // other properties
}

Where configs is an array of relative paths to files that share a common schema. I want to register/remove schema associations for these files when the array changes, but so far I haven't found a way to do this besides the jsonValidation contribution. But jsonValidation cannot be used there because the fileMatch pattern is not known at package time (users can structure their projects however they like).

It would be nice to have an API to add/remove schema associations at runtime, like in the XML extension. Or am I missing something and there is already a way to achieve the described behavior?

Thanks in advance!

@aeschli
Copy link
Contributor

aeschli commented Dec 6, 2023

duplicate of #96120

@aeschli aeschli closed this as completed Dec 6, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants