add description information to params for modules

This commit is contained in:
Joel Wetzell
2026-06-01 17:39:00 -05:00
parent 81ae00c943
commit 5d1e6622cb
19 changed files with 172 additions and 128 deletions
+4 -2
View File
@@ -22,8 +22,10 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"dsn": {
Type: "string",
MinLength: new(1),
Title: "Data Source Name",
Description: "the data source name (DSN) for the SQLite database",
Type: "string",
MinLength: new(1),
},
},
Required: []string{"dsn"},
+5 -4
View File
@@ -24,10 +24,11 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"port": {
Title: "Port",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Title: "Port",
Description: "the port for the HTTP server to listen on",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
},
},
Required: []string{"port"},
+3 -2
View File
@@ -22,8 +22,9 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"port": {
Title: "Port",
Type: "string",
Title: "Port",
Description: "the name of the MIDI port to listen to",
Type: "string",
},
},
Required: []string{"port"},
+3 -2
View File
@@ -24,8 +24,9 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"port": {
Title: "Port",
Type: "string",
Title: "Port",
Description: "the name of the MIDI port to send messages to",
Type: "string",
},
},
Required: []string{"port"},
+19 -14
View File
@@ -22,28 +22,33 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"broker": {
Title: "Broker URL",
Type: "string",
Title: "Broker URL",
Description: "the URL of the MQTT broker to connect to",
Type: "string",
},
"topic": {
Title: "Topic",
Type: "string",
Title: "Topic",
Description: "an MQTT topic to subscribe to",
Type: "string",
},
"clientId": {
Title: "Client ID",
Type: "string",
Title: "Client ID",
Description: "the client ID to use when connecting to the MQTT broker",
Type: "string",
},
"qos": {
Title: "QoS",
Type: "integer",
Minimum: jsonschema.Ptr[float64](0),
Maximum: jsonschema.Ptr[float64](2),
Default: json.RawMessage(`0`),
Title: "QoS",
Description: "the QoS level to use when publishing messages",
Type: "integer",
Minimum: jsonschema.Ptr[float64](0),
Maximum: jsonschema.Ptr[float64](2),
Default: json.RawMessage(`0`),
},
"retained": {
Title: "Retained",
Type: "boolean",
Default: json.RawMessage(`false`),
Title: "Retained",
Description: "whether to set the retained flag when publishing messages",
Type: "boolean",
Default: json.RawMessage(`false`),
},
},
Required: []string{"broker", "topic", "clientId"},
+6 -4
View File
@@ -20,12 +20,14 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"url": {
Title: "NATS Server URL",
Type: "string",
Title: "NATS Server URL",
Description: "the URL of the NATS server to connect to",
Type: "string",
},
"subject": {
Title: "Subject",
Type: "string",
Title: "Subject",
Description: "the subject to subscribe to",
Type: "string",
},
},
Required: []string{"url", "subject"},
+10 -8
View File
@@ -24,16 +24,18 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"ip": {
Title: "IP",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
Title: "IP",
Description: "the IP address to bind the NATS server to",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
},
"port": {
Title: "Port",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Default: json.RawMessage(`4222`),
Title: "Port",
Description: "the port for the NATS server to listen on",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Default: json.RawMessage(`4222`),
},
},
Required: []string{},
+8 -4
View File
@@ -21,12 +21,16 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"host": {
Type: "string",
Title: "Host",
Description: "the hostname or IP address of the Redis server to connect to",
Type: "string",
},
"port": {
Type: "integer",
Minimum: jsonschema.Ptr[float64](1),
Maximum: jsonschema.Ptr[float64](65535),
Title: "Port",
Description: "the port to use when connecting to the Redis server",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1),
Maximum: jsonschema.Ptr[float64](65535),
},
},
Required: []string{"host", "port"},
+10 -7
View File
@@ -25,17 +25,20 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"port": {
Title: "Port",
Type: "string",
Title: "Port",
Description: "the name of the serial port to connect to",
Type: "string",
},
"baudRate": {
Title: "Baud Rate",
Type: "integer",
Title: "Baud Rate",
Description: "the baud rate to use when connecting to the serial port",
Type: "integer",
},
"framing": {
Title: "Framing Method",
Type: "string",
Enum: []any{"LF", "CR", "CRLF", "SLIP", "RAW"},
Title: "Framing Method",
Description: "the method to use for framing messages on the serial port",
Type: "string",
Enum: []any{"LF", "CR", "CRLF", "SLIP", "RAW"},
},
},
Required: []string{"port", "baudRate", "framing"},
+19 -15
View File
@@ -29,27 +29,31 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"ip": {
Title: "IP",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
Title: "IP",
Description: "the IP address to bind the SIP server to",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
},
"port": {
Title: "Port",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Default: json.RawMessage(`5060`),
Title: "Port",
Description: "the port for the SIP server to listen on",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Default: json.RawMessage(`5060`),
},
"transport": {
Title: "Transport",
Type: "string",
Enum: []any{"udp", "tcp", "ws", "udp4", "tcp4"},
Default: json.RawMessage(`"udp"`),
Title: "Transport",
Description: "the transport protocol to use for the SIP server",
Type: "string",
Enum: []any{"udp", "tcp", "ws", "udp4", "tcp4"},
Default: json.RawMessage(`"udp"`),
},
"userAgent": {
Title: "User Agent",
Type: "string",
Default: json.RawMessage(`"showbridge"`),
Title: "User Agent",
Description: "the user agent string to use",
Type: "string",
Default: json.RawMessage(`"showbridge"`),
},
},
Required: []string{},
+24 -19
View File
@@ -30,33 +30,38 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"ip": {
Title: "IP",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
Title: "IP",
Description: "the IP address to bind the SIP server to",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
},
"port": {
Title: "Port",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Default: json.RawMessage(`5060`),
Title: "Port",
Description: "the port for the SIP server to listen on",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Default: json.RawMessage(`5060`),
},
"transport": {
Title: "Transport",
Type: "string",
Enum: []any{"udp", "tcp", "ws", "udp4", "tcp4"},
Default: json.RawMessage(`"udp"`),
Title: "Transport",
Description: "the transport protocol to use for the SIP server",
Type: "string",
Enum: []any{"udp", "tcp", "ws", "udp4", "tcp4"},
Default: json.RawMessage(`"udp"`),
},
"userAgent": {
Title: "User Agent",
Type: "string",
Default: json.RawMessage(`"showbridge"`),
Title: "User Agent",
Description: "the user agent string to use",
Type: "string",
Default: json.RawMessage(`"showbridge"`),
},
"separator": {
Title: "DTMF Separator",
Type: "string",
MinLength: new(1),
MaxLength: new(1),
Title: "DTMF Separator",
Description: "the DTMF character to use as a separator between DTMF digit groups",
Type: "string",
MinLength: new(1),
MaxLength: new(1),
},
},
Required: []string{"separator"},
+12 -9
View File
@@ -23,19 +23,22 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"host": {
Title: "Host",
Type: "string",
Title: "Host",
Description: "the hostname or IP address of the TCP server to connect to",
Type: "string",
},
"port": {
Title: "Port",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1),
Maximum: jsonschema.Ptr[float64](65535),
Title: "Port",
Description: "the port of the TCP server to connect to",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1),
Maximum: jsonschema.Ptr[float64](65535),
},
"framing": {
Title: "Framing Method",
Type: "string",
Enum: []any{"LF", "CR", "CRLF", "SLIP", "RAW"},
Title: "Framing Method",
Description: "the method used to frame messages over the TCP connection",
Type: "string",
Enum: []any{"LF", "CR", "CRLF", "SLIP", "RAW"},
},
},
Required: []string{"host", "port", "framing"},
+13 -10
View File
@@ -26,20 +26,23 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"ip": {
Title: "IP",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
Title: "IP",
Description: "the IP address to bind the TCP server to",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
},
"port": {
Title: "Port",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Title: "Port",
Description: "the port for the TCP server to listen on",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
},
"framing": {
Title: "Framing Method",
Type: "string",
Enum: []any{"LF", "CR", "CRLF", "SLIP", "RAW"},
Title: "Framing Method",
Description: "the method used to frame messages over the TCP connection",
Type: "string",
Enum: []any{"LF", "CR", "CRLF", "SLIP", "RAW"},
},
},
Required: []string{"port", "framing"},
+1 -1
View File
@@ -20,8 +20,8 @@ func init() {
Properties: map[string]*jsonschema.Schema{
"duration": {
Title: "Duration",
Description: "time in milliseconds between emitted events",
Type: "integer",
Description: "Interval duration in milliseconds",
},
},
Required: []string{"duration"},
+1 -1
View File
@@ -20,8 +20,8 @@ func init() {
Properties: map[string]*jsonschema.Schema{
"duration": {
Title: "Duration",
Description: "time in milliseconds before the timer fires",
Type: "integer",
Description: "Interval duration in milliseconds",
},
},
Required: []string{"duration"},
+8 -6
View File
@@ -21,14 +21,16 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"host": {
Title: "Host",
Type: "string",
Title: "Host",
Description: "the hostname or IP address of the UDP server to connect to",
Type: "string",
},
"port": {
Title: "Port",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1),
Maximum: jsonschema.Ptr[float64](65535),
Title: "Port",
Description: "the port of the UDP server to connect to",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1),
Maximum: jsonschema.Ptr[float64](65535),
},
},
Required: []string{"host", "port"},
+8 -6
View File
@@ -22,14 +22,16 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"ip": {
Title: "IP",
Type: "string",
Title: "IP",
Description: "the multicast address to listen on",
Type: "string",
},
"port": {
Title: "Port",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Title: "Port",
Description: "the port to listen on",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
},
},
Required: []string{"ip", "port"},
+15 -12
View File
@@ -23,22 +23,25 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"ip": {
Title: "IP",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
Title: "IP",
Description: "the IP address to bind the UDP server to",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
},
"port": {
Title: "Port",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Title: "Port",
Description: "the port for the UDP server to listen on",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
},
"bufferSize": {
Title: "Buffer Size",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1),
Maximum: jsonschema.Ptr[float64](65535),
Default: json.RawMessage("2048"),
Title: "Buffer Size",
Description: "the size of the buffer for incoming UDP messages",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1),
Maximum: jsonschema.Ptr[float64](65535),
Default: json.RawMessage("2048"),
},
},
Required: []string{"port"},
+3 -2
View File
@@ -23,8 +23,9 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"url": {
Title: "URL",
Type: "string",
Title: "URL",
Description: "the URL of the WebSocket server to connect",
Type: "string",
},
},
Required: []string{"url"},