Expand description
§schema-catalog
Types for the JSON Schema catalog format (schema-catalog.json), compatible with SchemaStore.
Part of the Lintel project.
§Usage
use schema_catalog::{Catalog, parse_catalog};
let json = r#"{"version":1,"schemas":[{"name":"Example","description":"An example schema","url":"https://example.com/schema.json","fileMatch":["*.example.json"]}]}"#;
let catalog: Catalog = parse_catalog(json).unwrap();
assert_eq!(catalog.schemas[0].name, "Example");§License
Apache-2.0
Structs§
- Catalog
- Schema catalog index that maps file patterns to JSON Schema URLs.
- Catalog
Group - A group of related schemas in the catalog.
- Schema
Entry - A single schema entry in the catalog.
Constants§
- DEFAULT_
SCHEMA_ URL - The default
$schemaURL for Lintel catalogs.
Functions§
- parse_
catalog - Parse a catalog from a JSON string.
- parse_
catalog_ value - Parse a catalog from a
serde_json::Value. - schema
- Generate the JSON Schema for the
Catalogtype.