Merge pull request #157 from jwetzell/fix/db-query-params-schema

add missing params schema to db.query processor
This commit is contained in:
Joel Wetzell
2026-05-18 18:20:50 -05:00
committed by GitHub
+18
View File
@@ -8,6 +8,7 @@ import (
"log/slog"
"text/template"
"github.com/google/jsonschema-go/jsonschema"
"github.com/jwetzell/showbridge-go/internal/common"
"github.com/jwetzell/showbridge-go/internal/config"
)
@@ -116,6 +117,23 @@ func init() {
RegisterProcessor(ProcessorRegistration{
Type: "db.query",
Title: "Query Database",
ParamsSchema: &jsonschema.Schema{
Type: "object",
Properties: map[string]*jsonschema.Schema{
"module": {
Title: "Module ID",
Type: "string",
Description: "ID of the database module to query",
},
"query": {
Title: "Query",
Type: "string",
Description: "SQL query to execute",
},
},
Required: []string{"module", "query"},
AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}},
},
New: func(config config.ProcessorConfig) (Processor, error) {
params := config.Params