mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-09-10 23:49:25 +00:00
generate json-schema dynamically in Go
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://showbridge.io/config.schema.json",
|
||||
"title": "Config",
|
||||
"description": "showbridge configuration",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"api": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the API server is enabled"
|
||||
},
|
||||
"port": {
|
||||
"type": "integer",
|
||||
"description": "Port for the API server to listen on"
|
||||
}
|
||||
},
|
||||
"required": ["port"]
|
||||
},
|
||||
"modules": {
|
||||
"$ref": "https://showbridge.io/modules.schema.json"
|
||||
},
|
||||
"routes": {
|
||||
"$ref": "https://showbridge.io/routes.schema.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,586 +0,0 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://showbridge.io/modules.schema.json",
|
||||
"title": "Modules",
|
||||
"description": "module configurations",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"title": "HTTP Server",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "http.server"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"port": {
|
||||
"title": "Port",
|
||||
"type": "integer",
|
||||
"minimum": 1024,
|
||||
"maximum": 65535
|
||||
}
|
||||
},
|
||||
"required": ["port"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Interval",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "time.interval"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"duration": {
|
||||
"title": "Duration",
|
||||
"type": "integer",
|
||||
"description": "Interval duration in milliseconds"
|
||||
}
|
||||
},
|
||||
"required": ["duration"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Timer",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "time.timer"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"duration": {
|
||||
"title": "Duration",
|
||||
"type": "integer",
|
||||
"description": "Timer duration in milliseconds"
|
||||
}
|
||||
},
|
||||
"required": ["duration"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "MIDI Input",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "midi.input"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"port": {
|
||||
"title": "Port",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["port"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "MIDI Output",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "midi.output"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"port": {
|
||||
"title": "Port",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["port"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "MQTT Client",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "mqtt.client"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"broker": {
|
||||
"title": "Broker URL",
|
||||
"type": "string"
|
||||
},
|
||||
"topic": {
|
||||
"title": "Topic",
|
||||
"type": "string"
|
||||
},
|
||||
"clientId": {
|
||||
"title": "Client ID",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["broker", "topic", "clientId"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "NATS Client",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "nats.client"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"url": {
|
||||
"title": "NATS Server URL",
|
||||
"type": "string"
|
||||
},
|
||||
"subject": {
|
||||
"title": "Subject",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["url", "subject"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "NATS Server",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "nats.server"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ip": {
|
||||
"title": "IP",
|
||||
"type": "string",
|
||||
"default": "0.0.0.0"
|
||||
},
|
||||
"port": {
|
||||
"title": "Port",
|
||||
"type": "integer",
|
||||
"minimum": 1024,
|
||||
"maximum": 65535,
|
||||
"default": 4222
|
||||
}
|
||||
},
|
||||
"required": [],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "PSN Client",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "psn.client"
|
||||
}
|
||||
},
|
||||
"required": ["id", "type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "RedisClientModule",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "redis.client"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"host": {
|
||||
"type": "string"
|
||||
},
|
||||
"port": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 65535
|
||||
}
|
||||
},
|
||||
"required": ["host", "port"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Serial Client",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "serial.client"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"port": {
|
||||
"title": "Port",
|
||||
"type": "string"
|
||||
},
|
||||
"baudRate": {
|
||||
"title": "Baud Rate",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": ["port", "baudRate"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "SIP Call Server",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "sip.call.server"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ip": {
|
||||
"title": "IP",
|
||||
"type": "string",
|
||||
"default": "0.0.0.0"
|
||||
},
|
||||
"port": {
|
||||
"title": "Port",
|
||||
"type": "integer",
|
||||
"minimum": 1024,
|
||||
"maximum": 65535,
|
||||
"default": 5060
|
||||
},
|
||||
"transport": {
|
||||
"title": "Transport",
|
||||
"type": "string",
|
||||
"enum": ["udp", "tcp", "ws", "udp4", "tcp4"],
|
||||
"default": "udp"
|
||||
},
|
||||
"userAgent": {
|
||||
"title": "User Agent",
|
||||
"type": "string",
|
||||
"default": "showbridge"
|
||||
}
|
||||
},
|
||||
"required": [],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "SIP DTMF Server",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "sip.dtmf.server"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ip": {
|
||||
"title": "IP",
|
||||
"type": "string",
|
||||
"default": "0.0.0.0"
|
||||
},
|
||||
"port": {
|
||||
"title": "Port",
|
||||
"type": "integer",
|
||||
"minimum": 1024,
|
||||
"maximum": 65535,
|
||||
"default": 5060
|
||||
},
|
||||
"transport": {
|
||||
"title": "Transport",
|
||||
"type": "string",
|
||||
"enum": ["udp", "tcp", "ws", "udp4", "tcp4"],
|
||||
"default": "udp"
|
||||
},
|
||||
"userAgent": {
|
||||
"title": "User Agent",
|
||||
"type": "string",
|
||||
"default": "showbridge"
|
||||
},
|
||||
"separator": {
|
||||
"title": "DTMF Separator",
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 1
|
||||
}
|
||||
},
|
||||
"required": ["separator"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "TCP Client",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "net.tcp.client"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"host": {
|
||||
"title": "Host",
|
||||
"type": "string"
|
||||
},
|
||||
"port": {
|
||||
"title": "Port",
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 65535
|
||||
},
|
||||
"framing": {
|
||||
"title": "Framing Method",
|
||||
"type": "string",
|
||||
"enum": ["LF", "CR", "CRLF", "SLIP", "RAW"]
|
||||
}
|
||||
},
|
||||
"required": ["host", "port", "framing"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "TCP Server",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "net.tcp.server"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ip": {
|
||||
"title": "IP",
|
||||
"type": "string",
|
||||
"default": "0.0.0.0"
|
||||
},
|
||||
"port": {
|
||||
"title": "Port",
|
||||
"type": "integer",
|
||||
"minimum": 1024,
|
||||
"maximum": 65535
|
||||
},
|
||||
"framing": {
|
||||
"title": "Framing Method",
|
||||
"type": "string",
|
||||
"enum": ["LF", "CR", "CRLF", "SLIP", "RAW"]
|
||||
}
|
||||
},
|
||||
"required": ["port", "framing"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "UDP Client",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "net.udp.client"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"host": {
|
||||
"title": "Host",
|
||||
"type": "string"
|
||||
},
|
||||
"port": {
|
||||
"title": "Port",
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 65535
|
||||
}
|
||||
},
|
||||
"required": ["host", "port"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "UDP Multicast",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "net.udp.multicast"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ip": {
|
||||
"title": "IP",
|
||||
"type": "string"
|
||||
},
|
||||
"port": {
|
||||
"title": "Port",
|
||||
"type": "integer",
|
||||
"minimum": 1024,
|
||||
"maximum": 65535
|
||||
}
|
||||
},
|
||||
"required": ["ip", "port"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "UDP Server",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "net.udp.server"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ip": {
|
||||
"title": "IP",
|
||||
"type": "string",
|
||||
"default": "0.0.0.0"
|
||||
},
|
||||
"port": {
|
||||
"title": "Port",
|
||||
"type": "integer",
|
||||
"minimum": 1024,
|
||||
"maximum": 65535
|
||||
}
|
||||
},
|
||||
"required": ["port"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "params"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,926 +0,0 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://showbridge.io/processors.schema.json",
|
||||
"title": "Processors",
|
||||
"description": "processor configurations",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Decode ArtNet Packet",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "artnet.packet.decode"
|
||||
}
|
||||
},
|
||||
"required": ["type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Encode ArtNet Packet",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "artnet.packet.encode"
|
||||
}
|
||||
},
|
||||
"required": ["type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Debug Log",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "debug.log"
|
||||
}
|
||||
},
|
||||
"required": ["type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Filter by Expr expression",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "filter.expr"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"expression": {
|
||||
"title": "Expression",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["expression"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Filter by Regex",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "filter.regex"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pattern": {
|
||||
"title": "Pattern",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["pattern"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Filter Unique Values",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "filter.unique"
|
||||
}
|
||||
},
|
||||
"required": ["type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Parse Float",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "float.parse"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bitSize": {
|
||||
"title": "Bit Size",
|
||||
"type": "integer",
|
||||
"enum": [32, 64],
|
||||
"default": 64
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Create FreeD",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "freed.create"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"title": "Camera ID",
|
||||
"type": "string"
|
||||
},
|
||||
"pan": {
|
||||
"title": "Pan",
|
||||
"type": "string"
|
||||
},
|
||||
"tilt": {
|
||||
"title": "Tilt",
|
||||
"type": "string"
|
||||
},
|
||||
"roll": {
|
||||
"title": "Roll",
|
||||
"type": "string"
|
||||
},
|
||||
"posX": {
|
||||
"title": "Position X",
|
||||
"type": "string"
|
||||
},
|
||||
"posY": {
|
||||
"title": "Position Y",
|
||||
"type": "string"
|
||||
},
|
||||
"posZ": {
|
||||
"title": "Position Z",
|
||||
"type": "string"
|
||||
},
|
||||
"zoom": {
|
||||
"title": "Zoom",
|
||||
"type": "string"
|
||||
},
|
||||
"focus": {
|
||||
"title": "Focus",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"pan",
|
||||
"tilt",
|
||||
"roll",
|
||||
"posX",
|
||||
"posY",
|
||||
"posZ",
|
||||
"zoom",
|
||||
"focus"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Decode FreeD",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "freed.decode"
|
||||
}
|
||||
},
|
||||
"required": ["type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Encode FreeD",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "freed.encode"
|
||||
}
|
||||
},
|
||||
"required": ["type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Do HTTP Request",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "http.request.do"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"method": {
|
||||
"title": "HTTP Method",
|
||||
"type": "string",
|
||||
"enum": ["GET", "POST"]
|
||||
},
|
||||
"url": {
|
||||
"title": "URL",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["method", "url"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Create HTTP Response",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "http.response.create"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"title": "Status Code",
|
||||
"type": "integer"
|
||||
},
|
||||
"body": {
|
||||
"title": "Body",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["status", "body"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Parse Int",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "int.parse"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"base": {
|
||||
"title": "Base",
|
||||
"type": "integer",
|
||||
"enum": [0, 2, 8, 10, 16],
|
||||
"default": 10
|
||||
},
|
||||
"bitSize": {
|
||||
"title": "Bit Size",
|
||||
"type": "integer",
|
||||
"enum": [0, 8, 16, 32, 64],
|
||||
"default": 64
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Random Int",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "int.random"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"min": {
|
||||
"title": "Minimum",
|
||||
"type": "integer"
|
||||
},
|
||||
"max": {
|
||||
"title": "Maximum",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": ["min", "max"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Scale Int",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "int.scale"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"inMin": {
|
||||
"title": "Input Minimum",
|
||||
"type": "integer"
|
||||
},
|
||||
"inMax": {
|
||||
"title": "Input Maximum",
|
||||
"type": "integer"
|
||||
},
|
||||
"outMin": {
|
||||
"title": "Output Minimum",
|
||||
"type": "integer"
|
||||
},
|
||||
"outMax": {
|
||||
"title": "Output Maximum",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": ["inMin", "inMax", "outMin", "outMax"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Decode JSON",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "json.decode"
|
||||
}
|
||||
},
|
||||
"required": ["type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Encode JSON",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "json.encode"
|
||||
}
|
||||
},
|
||||
"required": ["type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Create MIDI Message",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "midi.message.create"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"title": "MIDI Message Type",
|
||||
"type": "string",
|
||||
"enum": ["NoteOn", "noteon", "note_on"]
|
||||
},
|
||||
"channel": {
|
||||
"title": "Channel",
|
||||
"type": "string"
|
||||
},
|
||||
"note": {
|
||||
"title": "Note",
|
||||
"type": "string"
|
||||
},
|
||||
"velocity": {
|
||||
"title": "Velocity",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["type", "channel", "note", "velocity"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"title": "MIDI Message Type",
|
||||
"type": "string",
|
||||
"enum": ["NoteOff", "noteoff", "note_off"]
|
||||
},
|
||||
"channel": {
|
||||
"title": "Channel",
|
||||
"type": "string"
|
||||
},
|
||||
"note": {
|
||||
"title": "Note",
|
||||
"type": "string"
|
||||
},
|
||||
"velocity": {
|
||||
"title": "Velocity",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["type", "channel", "note", "velocity"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"title": "MIDI Message Type",
|
||||
"type": "string",
|
||||
"enum": ["ControlChange", "controlchange", "control_change"]
|
||||
},
|
||||
"channel": {
|
||||
"title": "Channel",
|
||||
"type": "string"
|
||||
},
|
||||
"control": {
|
||||
"title": "Control",
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"title": "Value",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["type", "channel", "control", "value"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"title": "MIDI Message Type",
|
||||
"type": "string",
|
||||
"enum": ["ProgramChange", "programchange", "program_change"]
|
||||
},
|
||||
"channel": {
|
||||
"title": "Channel",
|
||||
"type": "string"
|
||||
},
|
||||
"program": {
|
||||
"title": "Program",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["type", "channel", "program"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Decode MIDI Message",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "midi.message.decode"
|
||||
}
|
||||
},
|
||||
"required": ["type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Encode MIDI Message",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "midi.message.encode"
|
||||
}
|
||||
},
|
||||
"required": ["type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Unpack MIDI Message",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "midi.message.unpack"
|
||||
}
|
||||
},
|
||||
"required": ["type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Create MQTT Message",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "mqtt.message.create"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"topic": {
|
||||
"title": "Topic",
|
||||
"type": "string"
|
||||
},
|
||||
"qos": {
|
||||
"title": "QoS",
|
||||
"type": "number"
|
||||
},
|
||||
"retained": {
|
||||
"title": "Retained",
|
||||
"type": "boolean"
|
||||
},
|
||||
"payload": {
|
||||
"title": "Payload",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["topic", "qos", "retained", "payload"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Encode MQTT Message",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "mqtt.message.encode"
|
||||
}
|
||||
},
|
||||
"required": ["type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Create NATS Message",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "nats.message.create"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"subject": {
|
||||
"title": "Subject",
|
||||
"type": "string"
|
||||
},
|
||||
"payload": {
|
||||
"title": "Payload",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["subject", "payload"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Create OSC Message",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "osc.message.create"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {
|
||||
"title": "Address",
|
||||
"type": "string"
|
||||
},
|
||||
"args": {
|
||||
"title": "Arguments",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"types": {
|
||||
"title": "Argument Types",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["address"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Decode OSC Message",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "osc.message.decode"
|
||||
}
|
||||
},
|
||||
"required": ["type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Encode OSC Message",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "osc.message.encode"
|
||||
}
|
||||
},
|
||||
"required": ["type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Router Input",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "router.input"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"source": {
|
||||
"title": "Source",
|
||||
"type": "string",
|
||||
"description": "source to report as to the router"
|
||||
}
|
||||
},
|
||||
"required": ["source"]
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Router Output",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "router.output"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"module": {
|
||||
"title": "Module ID",
|
||||
"type": "string",
|
||||
"description": "ID of module to send output to"
|
||||
}
|
||||
},
|
||||
"required": ["module"]
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Evaluate Expr expression",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "script.expr"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"expression": {
|
||||
"title": "Expression",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["expression"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Run JavaScript",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "script.js"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"program": {
|
||||
"title": "Program",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["program"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Run WASM Plugin",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "script.wasm"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"title": "Path",
|
||||
"type": "string"
|
||||
},
|
||||
"function": {
|
||||
"title": "Function",
|
||||
"type": "string",
|
||||
"default": "process"
|
||||
},
|
||||
"enableWasi": {
|
||||
"title": "Enable WASI",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"required": ["path"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Create String",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "string.create"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"template": {
|
||||
"title": "Template",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["template"]
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Decode String",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "string.decode"
|
||||
}
|
||||
},
|
||||
"required": ["type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Encode String",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "string.encode"
|
||||
}
|
||||
},
|
||||
"required": ["type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Split String",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "string.split"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"separator": {
|
||||
"title": "Separator",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["separator"]
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Get Struct Field",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "struct.field.get"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"title": "Field Name",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["name"]
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Get Struct Method",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "struct.method.get"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"title": "Method Name",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["name"]
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Sleep",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "time.sleep"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"duration": {
|
||||
"title": "Duration",
|
||||
"type": "integer",
|
||||
"description": "Duration to sleep in milliseconds"
|
||||
}
|
||||
},
|
||||
"required": ["duration"]
|
||||
}
|
||||
},
|
||||
"required": ["type", "params"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://showbridge.io/routes.schema.json",
|
||||
"title": "Routes",
|
||||
"description": "route configurations",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"input": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"processors": {
|
||||
"$ref": "https://showbridge.io/processors.schema.json"
|
||||
}
|
||||
},
|
||||
"required": ["input"]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user