Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json schemas for yaml files #369

Open
sed-i opened this issue May 18, 2021 · 1 comment
Open

json schemas for yaml files #369

sed-i opened this issue May 18, 2021 · 1 comment

Comments

@sed-i
Copy link

sed-i commented May 18, 2021

metadata.yaml, actions.yaml and config.yaml would be much easier to write with auto completion, and charm authors would encounter less runtime errors with auto validation.

I created a json schema for metadata.yaml based on the Charm Metadata v2 post by @hpidcock and I really like the autocompletion + validation IDEs offer once you have a schema (I tested the schema using vscode + yaml extension).

  • Validation could be done as part of charmcraft build (@facundobatista)
  • Auto completion could be achieved by pointing the IDE to the json schema locally, and eventually, perhaps, via the schema store.

Schema draft: metadata-schema.json

@facundobatista
Copy link

If there are "official" schemas, we can add checks at build time in charmcraft, for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants