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

Enable loading of customTags from inside the JSON schemas themselves

Open
#219 4 comments 2 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

JSON schemas can contain addition information that is not part of the schema itself, this means that they can also expose which customTags are expected to be found on a specific document.

This could be of great use because each schema published is the likely person known which tags their projects support. It would also mean that we avoid avoid the need to force users to add all kind of customTags to their user settings.json. Also adding global such customTags is not the best practice because it would prevent us from detecting if a tag unsupported by one product/file-type is added.

I propose looking for something like:

{
    "$schema": "https://json-schema.org/draft/2019-09/schema",
    "properties": {
        "customTags": ["!encrypted/pkcs1-oaep sequence"]
    },

I verified and that schema is passing validation.

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 files or tests. Start by tracing how JSON schemas are loaded and how customTags are currently read from user settings, then determine how schema metadata should be recognized and validated. Done means supported customTags from a schema are applied to its documents without requiring equivalent global settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
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.