Skip to content

Adding configuration file validation for more file formats #2

@OrangeUtan

Description

@OrangeUtan

At the start beet only supported Json configuration files. Therefore the extension shipped with built-in validation using Json schemas.

However, since v0.27.0 beet now also supports *.yaml, *.yml, *.toml and pyproject.toml as configuration files. I think it would be usefull to add validation for these files.

Now there is the challlenge of how this will be implemented. Json validation is built-in to Vscode, YAML and toml unfortunately not.

YAML

YAML is a superset of Json and can therefore use the same schemas that are used for Json. The validation itself however requires an extension.
A possible solution would be to use the YAML extension from RedHat, since it supports schemas from SchemaStore. If we add the existing Json schemas to SchemaStore, they can be used for both Json and Yaml validation. Schemas would no longer be packaged inside the extension and could be updated independently.

Toml / pyproject.toml

I'm still searching for a toml validator. Again, relying on an extension is probably the best solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions