common.json
Shared definitions reused by Muddler JSON schemas.
Schema URL
{
"$schema": "https://schema.gesslar.dev/muddler/v1/common.json"
}
Definitions
This schema includes 13 reusable definition(s): nodeBase, commandString, yesNo, luaScript, hexColor, durationString, intOrDigitsString, positiveIntOrDigitsString, hours23, minutes59, milliseconds999, timerTimeInput, fileRef
Full Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schema.gesslar.dev/muddler/v1/common.json",
"title": "Muddler Common Definitions Schema",
"description": "Shared definitions reused by Muddler JSON schemas.",
"$defs": {
"nodeBase": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Display name."
},
"isActive": {
"$ref": "#/$defs/yesNo",
"default": "yes"
},
"isFolder": {
"$ref": "#/$defs/yesNo",
"default": "no"
},
"script": {
"$ref": "#/$defs/luaScript"
}
}
},
"commandString": {
"type": "string",
"description": "Command text (optional convenience alongside script)."
},
"yesNo": {
"anyOf": [
{
"type": "string",
"enum": [
"yes",
"no"
]
},
{
"type": "boolean"
}
],
"default": "yes"
},
"luaScript": {
"type": "string",
"description": "Lua code. Leave empty to let muddler pull the corresponding .lua file during build.",
"default": ""
},
"hexColor": {
"type": "string",
"pattern": "^#([A-Fa-f0-9]{6})$",
"description": "RGB hex color in #rrggbb form."
},
"durationString": {
"type": "string",
"pattern": "^\\d{2}:\\d{2}:\\d{2}\\.\\d{3}$",
"description": "Timer duration string (hh:mm:ss.mmm)."
},
"intOrDigitsString": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string",
"pattern": "^\\d+$"
}
]
},
"positiveIntOrDigitsString": {
"description": "Non-negative integer or string of digits.",
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "string",
"pattern": "^\\d+$"
}
]
},
"hours23": {
"description": "Hours component (0-23).",
"oneOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 23
},
{
"type": "string",
"pattern": "^(?:\\d|1\\d|2[0-3])$"
}
]
},
"minutes59": {
"description": "Minutes/seconds component (0-59).",
"oneOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 59
},
{
"type": "string",
"pattern": "^(?:\\d|[1-5]\\d)$"
}
]
},
"milliseconds999": {
"description": "Milliseconds component (0-999).",
"oneOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 999
},
{
"type": "string",
"pattern": "^\\d{1,3}$"
}
]
},
"timerTimeInput": {
"type": "object",
"properties": {
"time": {
"$ref": "#/$defs/durationString"
},
"hours": {
"$ref": "#/$defs/hours23"
},
"minutes": {
"$ref": "#/$defs/minutes59"
},
"seconds": {
"$ref": "#/$defs/minutes59"
},
"milliseconds": {
"$ref": "#/$defs/milliseconds999"
}
},
"oneOf": [
{
"required": [
"time"
]
},
{
"not": {
"required": [
"time"
]
},
"anyOf": [
{
"required": [
"hours"
]
},
{
"required": [
"minutes"
]
},
{
"required": [
"seconds"
]
},
{
"required": [
"milliseconds"
]
}
]
}
]
},
"fileRef": {
"type": "string",
"description": "Relative path used internally by muddler; usually set automatically."
}
}
}