yaml-js / vite

Vite Plugin to allow importing Yaml files on your projects
MIT License
3 stars 0 forks source link

[Work Item]: add support for yaml schemas #54

Open pedromvgomes opened 3 months ago

pedromvgomes commented 3 months ago

Priority

Normal

Initiative / Goal

Add support for yaml schemas, allowing data to be validated before import. The system should also generate typescript types.

Description

Add support to yaml schemas. Schemas should be used to validate the data input as well as to generate typescript types.

Assigning a schema to a yaml file should be done
1- Either by having a comment on the first line as follow:

$schema: https://raw.githubusercontent.com/oyvindberg/bleep/master/schema.json

2- Using json schema store. We still need to sort out how schemas will matched with actual files

Acceptance Criteria and Must Have Scope

- I am able to specify a schema file on the actual file, and the content gets validated
- I am able to match a file with a schema registered on the json schema store, and the content gets validated
- Whenever a schema is associated with a yaml file, it is imported with specific typings

Timeline

1 month