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
- A JSON Schema catalog following the
SchemaStorecatalog format. See: https://json.schemastore.org/schema-catalog.json - Catalog
Group - A group of related schemas in the catalog.
- Schema
Entry - A single schema entry in the catalog.
Functions§
- parse_
catalog - Parse a catalog from a JSON string.
- parse_
catalog_ value - Parse a catalog from a
serde_json::Value.