-
Notifications
You must be signed in to change notification settings - Fork 261
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
Set specific Kubernetes Schema Version #211
Comments
it has been moved to
Using the yaml.schemas should be something working. I think it is a matter of priorities in schema resolution. hope it would be handled with #250 Another solution would be to be able to specify the yaml schema in the yaml data file directly #204
I'm not a big fan of environment variable as it can have collateral effect but it seems a quick win to add this possibility. (and given the number of +1 on this issue ti can allow to please a lot of people) @JPinkney From technical point of view, is it a matter of modifying only yaml-language-server/src/server.ts Lines 115 to 116 in 7346049
|
Yes I believe so. But TBH I question if we should even have the kubernetes schema embedded in this extension anymore and should just tell people to add it if they want |
@JPinkney I think that's the right move. It feels weird that Kubernetes is just kind of embedded and "works" (assuming the version is good :p) when you turn it on. |
@joshrosso Yeah, this language server originally started (3~ years ago) as a kubernetes language server and once we found out that the support for kubernetes worked well we expanded it to all of yaml but kept that schema embedded. That's why its been there for so long |
@JPinkney 100% makes sense! |
It appears the Kubernetes schema is hardcoded at https://github.com/redhat-developer/yaml-language-server/blob/master/src/server.ts#L32.
Is it possible to set a specific version? For example, if I wanted to use https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/v1.16.0-standalone-strict/all.json?
I tried
but no luck.
For now, editing
server.ts
on my local machine works well. I wonder if an [optional] environment variable could be helpful?The text was updated successfully, but these errors were encountered: