From 1416845fa64c6e20af3a8f057a4887a3463eba9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Mon, 30 Aug 2021 12:13:22 -0700 Subject: [PATCH] KDL schema spec Fixes: https://github.com/kdl-org/kdl/issues/83 --- SCHEMA-SPEC.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 SCHEMA-SPEC.md diff --git a/SCHEMA-SPEC.md b/SCHEMA-SPEC.md new file mode 100644 index 0000000..74c6076 --- /dev/null +++ b/SCHEMA-SPEC.md @@ -0,0 +1,41 @@ +# KDL Schema Specification + +## Example + +```kdl +document description="KDL Schema KDL schema in KDL" schema-url="https://github.com/zkat/kdl" { + node "document" { + prop "schema-url" type="url" + prop "description" type="string" + children id="node-children" { + node "node" id="node" { + value description="name of the node" type="string" + prop "description" type="string" + prop "id" type="string" + prop "ref" type="string" + children { + node "prop" description="node property key/value pair" { + prop "id" type="string" + prop "ref" type="string" + value description="property key" type="string" + prop "type" type="string" + prop "description" type="string" + } + node "value" description="one or more direct node values" { + prop "id" type="string" + prop "ref" type="string" + prop "description" type="string" + prop "type" type="string" + } + node "children" { + prop "id" type="string" + prop "ref" type="string" + prop "description" type="string" + children ref="node-children" + } + } + } + } + } +} +```