Skip to main content

Crate lintel_identify

Crate lintel_identify 

Source
Expand description

§lintel-identify

Crates.io docs.rs GitHub License

Schema identification for JSON and YAML files using JSON Schema

§Features

Identifies which JSON Schema applies to a given file using multiple discovery strategies:

  1. YAML modeline (# yaml-language-server: $schema=...)
  2. Inline $schema property
  3. lintel.toml schema mappings
  4. SchemaStore catalog matching by filename

Optionally renders schema documentation in the terminal with --explain.

Part of the Lintel project.

§License

Apache-2.0

Structs§

IdentifyArgs
ResolvedFileSchema
Result of resolving a schema for a given file path.

Functions§

build_retriever
Build a SchemaCache from CliCacheOptions.
identify_args
Construct the bpaf parser for IdentifyArgs.
resolve_schema_for_content
Resolve a schema from in-memory content and a virtual file path.
resolve_schema_for_file
Resolve the schema URI for a file path using the same priority as validation:
resolve_schema_for_path
Resolve the schema URI for a file path using only path-based matching:
run