Skip to content

json schemas for yaml files #369

Description

@sed-i

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions