yaml-language-server icon indicating copy to clipboard operation
yaml-language-server copied to clipboard

Support different schema for sub-value

Open cwrau opened this issue 3 years ago • 1 comments

Is your enhancement related to a problem? Please describe.

Some resources, I'm talking mainly about https://fluxcd.io/flux/components/helm/helmreleases/, have a field, in this case .spec.values, that are tagged as object but in reality have a different schema, which is dynamic and dependant on other fields

Describe the solution you would like

Some way to inject the correct schema like with the # yaml-language-server: $schema= modeline

Describe alternatives you have considered

Manually getting the schema and injecting the correct schema at .spec.values, but that sounds very hard and very easy to break

Additional context

I in no way mean that this language-server should support the fetching of the correct schema via kubernetes. But this way the clients could implement this

cwrau avatar Nov 29 '22 15:11 cwrau

+1 but would also like any number of sub schemas. In the case of a HelmRelease, there may be a schema for the helm chart, and also another schema for config of the the application which the helm chart is configuring.

SeanHood avatar Jun 06 '25 19:06 SeanHood