Skip to content

Feature: Support Inline Schemas #36

Open
@brianespinosa

Description

@brianespinosa

Feature: Support inline schemas

It is possible to define a path to a schema in both json and yaml files. It would be great if we could pick these schema references up and use them to validate a file.

For yaml, this inline syntax looks to be part of the spec. For json, this is technically not part of the json-schema spec, but is specific to VSCode... though is starting to pick up more broad use. The trick would be to be able to validate a JSON file and understand if the file is itself a schema or if it is referencing a schema draft.

I would be happy to take a shot at adding support for both of these use cases, but if we think this is out of scope for this plugin, please let me know so I can instead implement this separately as a different action that only supports this inline syntax.

Success Criteria:

  • Allows validation of JSON files when they have an inline reference to a $schema file.
  • Allows validation of YAML files when they have an inline reference to a # yaml-language-server: $schema= comment.
  • Both of the above should work with relative, absolute, or url paths.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions