KDL schema spec

Fixes: https://github.com/kdl-org/kdl/issues/83
This commit is contained in:
Kat Marchán 2021-08-30 12:13:22 -07:00
parent 9e35601c91
commit 1416845fa6
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
1 changed files with 41 additions and 0 deletions

41
SCHEMA-SPEC.md Normal file
View File

@ -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"
}
}
}
}
}
}
```