SchemaStore / SchemaStore/schemastore
Match schema based on existence of a root file
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.8k
- Forks
- 2.3k
- Avg merge
- 20h 23m
- Merged PRs (30d)
- 124
Description
Description of the feature / enhancement.
The existence of a root file should be able to change the precedence of globs associated with schemas. As seen #3948, a project customarily looks for YAML files in directories like **/models/**.yaml. While this is too generic to apply to all situations, it would be useful for this glob to apply if and only if there is some sort of $MYPROJECTNAME.yaml file at the root directory.
In monorepos, the logic of detecting this file may increase code complexity or decrease performance too much, so at least initially, I propose that this logic only runs in "non-monorepos".
Related: #4961
Are you making a PR for this?
Yes, I will create a PR.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the schema glob precedence and project or monorepo detection entry points in the repository. Trace how root files are currently discovered, then define completion as root-file-aware precedence for non-monorepos without changing monorepo behavior; add or update focused tests for these cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, json, yaml
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100