JVZJV56IAT3FEXAJZDZIZQROQIZOV3AGU2D5Y2HE7J6TOXG6ZKFQC
PI55U5GZKMYTPKYXC26MVSRK6IO5B63CX2PSAGWXNINZAUFROTNAC
BDJKSDV2FRXCK4FQ7V2TNT5VWXXKIPTEAG5QJALWRURKK6B6OXYQC
BUCK3IEXP4XH3LNGJX4ZTCDKXDIM5BXLSESBVYLXM2NNHQ6IIHHAC
WOVIBHHYIGB6XCWIYLKGF5R4GX7UJJUTSDJVPWDR3ZHCWZUZSRDAC
3MT46E3X5M3PTXCUZ6IJJAIM6WH4DWAOMPCGEUUSKMY7TEV6NLCQC
AB4D7HLAGOSLBOOTTGNNBT63WUDWXNH7CQVHHRBTEJSN4SNQF43QC
#![doc = include_str!("../README.md")]
#![warn(
elided_lifetimes_in_paths,
explicit_outlives_requirements,
missing_debug_implementations,
missing_docs,
noop_method_call,
single_use_lifetimes,
trivial_casts,
trivial_numeric_casts,
unreachable_pub,
unsafe_code,
unused_crate_dependencies,
unused_qualifications
)]
#![warn(clippy::pedantic, clippy::cargo)]
# kdl-schema-check
[KDL Schema](https://github.com/kdl-org/kdl/blob/1.0.0/SCHEMA-SPEC.md) document validation.
## examples
Library usage:
```rust
use kdl_schema::Schema;
use kdl_schema_check::CheckExt;
let schema_kdl = r#"
document {
info {
title "Sample Schema" lang="en"
description "An example schema" lang="en"
author "boringcactus"
}
node "name" {
value {
type "string"
}
}
node "age" {
value {
type "number"
}
}
}
"#;
let schema = Schema::parse(schema_kdl).unwrap();
let document = r#"
name "Joe"
age 69
"#;
schema.check_text_matches("<sample document>", document)
.expect("document validation failed");
```
Binary usage:
```text
$ cargo install kdl-schema-check
$ kdl-schema-check schema.kdl document.kdl
Validation succeeded!
```
## conditions blocking version 1.0.0
- return more than one error
- kdl-schema is at 1.0.0
- comprehensive tests for error reporting
- no TODOs left in code
## license
[Blue Oak Model License 1.0.0](https://blueoakcouncil.org/license/1.0.0).
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
description = "schema-based document verification for KDL"
repository = "https://nest.pijul.com/boringcactus/kdl-schema-check"
license = "BlueOak-1.0.0"
keywords = ["kdl"]
categories = ["command-line-utilities"]