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

Feature request: Case insensitive enum values

Open
#201 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

It'd be nice to have a way to mark a enum to be case insensitive, i.e. to do case insensitive comparison of the actual value in the document with the items of the enumeration during validation.

There was some discussion around this use case in JSON schema mailing list quite a while ago, and in general there're legit concerns about feasibility of anything like this in the JSON schema itself. However I believe it makes sense as a custom validator extension. As an example, IntelliJ introduced x-intellij-case-insensitive extension parameter for this use case recently WEB-39440.

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

Start by locating the language server's enum-validation entry point and any existing extension-handling code; the issue names no files or tests. Define how the custom parameter should be expressed and how matching should behave, then add coverage for case-insensitive enum validation before considering the work done.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.