From 3b158185d60c2ee30e0d44fbfd6526fba722ec28 Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Mon, 18 May 2026 18:17:02 -0500 Subject: [PATCH] add missing params schema to db.query processor --- internal/processor/db-query.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/internal/processor/db-query.go b/internal/processor/db-query.go index c5893fe..3674b23 100644 --- a/internal/processor/db-query.go +++ b/internal/processor/db-query.go @@ -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