redhat-developer / redhat-developer/yaml-language-server

Feature request: let me apply an ad-hoc inline schema to a block

Open
#1,030 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.5k
Forks
352
Avg merge
2d 7h
Merged PRs (30d)
11

Description

Is your enhancement related to a problem? Please describe.

It would be useful if I could apply a JSON/yaml schema to an arbitrary part of my document.
For example, let's say I'm writing a kustomization.yaml that instantiates a Helm chart:

helmCharts:
  - repo: https://charts.jetstack.io
    name: cert-manager
    namespace: cert-manager
    version: v1.17.0
    includeCRDs: true
    releaseName: cert-manager
    valuesInline: # !! <-- there is actually a values.schema.json in the chart, but I have no way of hooking it up to here where I need it
      crds:
        enabled: true
Describe the solution you would like

Some syntax to let me hook this up in an ad-hoc way. Arbitrary example:

helmCharts:
  - ...
    valuesInline:
      # $schema=./charts/cert-manager-v1.17.0/cert-manager/values.schema.json
      crds:
        enabled: true

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no implementation files or tests. Start by reviewing the YAML language server's existing schema-association behavior and the proposed inline $schema syntax, then document the expected behavior for arbitrary blocks and verify it with focused tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, yaml
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.