Skip to content

Instantly share code, notes, and snippets.

@agoose77
Last active February 21, 2024 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agoose77/cdb4474f5a200c2a40fe23d942e0124f to your computer and use it in GitHub Desktop.
Save agoose77/cdb4474f5a200c2a40fe23d942e0124f to your computer and use it in GitHub Desktop.
{
"type": "object",
"oneOf": [
{
"$ref": "#/$defs/jb-article-format"
},
{
"$ref": "#/$defs/jb-book-format"
},
{
"$ref": "#/$defs/jb-no-format"
}
],
"required": [],
"$defs": {
"jb-article-format": {
"properties": {
"format": {
"const": "jb-article"
},
"root": {
"type": "string"
},
"defaults": {
"$ref": "#/$defs/defaults"
}
},
"required": [
"format",
"root"
],
"additionalProperties": false
},
"jb-book-format": {
"properties": {
"format": {
"const": "jb-book"
},
"root": {
"type": "string"
},
"defaults": {
"$ref": "#/$defs/defaults"
}
},
"required": [
"format",
"root"
],
"additionalProperties": false
},
"jb-no-format": {
"properties": {
"subtrees": {
"type": "array",
"items": {
"$ref": "#/$defs/subtree"
}
},
"root": {
"type": "string"
},
"defaults": {
"$ref": "#/$defs/defaults"
}
},
"required": [
"subtrees",
"root"
],
"additionalProperties": false
},
"name": {
"type": "string"
},
"fileEntry": {
"type": "object",
"properties": {
"file": {
"type": "string"
},
"title": {
"type": "string"
},
"subtrees": {
"type": "array",
"items": {
"$ref": "#/$defs/subtree"
}
}
},
"required": [
"file"
]
},
"globEntry": {
"type": "object",
"properties": {
"glob": {
"type": "string"
},
"subtrees": {
"type": "array",
"items": {
"$ref": "#/$defs/subtree"
}
}
},
"required": [
"glob"
]
},
"urlEntry": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"title": {
"type": "string"
},
"subtrees": {
"type": "array",
"items": {
"$ref": "#/$defs/subtree"
}
}
},
"required": [
"url"
]
},
"subtree": {
"type": "object",
"properties": {
"entries": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/$defs/fileEntry"
},
{
"$ref": "#/$defs/urlEntry"
},
{
"$ref": "#/$defs/globEntry"
}
]
}
},
"caption": {
"type": "string"
},
"hidden": {
"type": "boolean"
},
"maxdepth": {
"type": "number"
},
"numbered": {
"type": "boolean"
},
"reversed": {
"type": "boolean"
},
"titlesonly": {
"type": "boolean"
}
},
"required": [
"entries"
]
},
"defaults": {
"type": "object",
"properties": {
"caption": {
"type": "string"
},
"hidden": {
"type": "boolean"
},
"maxdepth": {
"type": "number"
},
"numbered": {
"type": "boolean"
},
"reversed": {
"type": "boolean"
},
"titlesonly": {
"type": "boolean"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment