more work, add descriptions

This commit is contained in:
Kat Marchán 2021-08-30 13:35:30 -07:00
parent 1416845fa6
commit 0a804976a8
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
1 changed files with 47 additions and 21 deletions

View File

@ -4,33 +4,59 @@
```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"
node "document" min=1 max=1 {
prop "schema-url" type="url" \
description="URL where you can find this schema. Informational only."
prop "description" type="string" \
description="General purpose and description for this document schema."
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"
value min=1 max=1 type="string" \
description="The name of the node."
prop "description" type="string" \
description="A description of this node's purpose."
prop "id" type="string" \
description="globally-unique ID of this node."
prop "ref" type="string" \
description="globally unique reference to this node."
prop "min" type="number" \
description="minimum number of instances of this node in its parent's children."
prop "max" type="number" \
description="maximum number of instances of this node in its parent's children."
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 "prop" description="A node property key/value pair." {
value type="string" min=1 max=1 \
description="The property key."
prop "type" type="string" \
description="The type for this prop's value."
prop "id" type="string" \
description="A globally-unique ID of this property."
prop "ref" type="string" \
description="A globally unique reference to another property node."
prop "description" type="string" \
description="A description of this property's purpose."
}
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"
prop "id" type="string" \
description="A globally-unique ID of this value."
prop "ref" type="string" \
description="A globally unique reference to another value node."
prop "type" type="string" \
description="The type for this value."
prop "description" type="string" \
description="A description of this property's purpose."
prop "min" type="number" \
description="Minimum number of this value to be provided to the node."
prop "max" type="number" \
description="Maximum number of this value to be provided to the node."
}
node "children" {
prop "id" type="string"
prop "ref" type="string"
prop "description" type="string"
node "children" max=1 {
prop "id" type="string" \
description="A globally-unique ID of this children node."
prop "ref" type="string" \
description="A globally unique reference to another children node."
prop "description" type="string" \
description="A description of this property's purpose."
children ref="node-children"
}
}