From 1bbe0cc04521d32cdd50b35dfb79a9d76e2587ca Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Wed, 20 May 2026 17:27:32 -0500 Subject: [PATCH] don't make params schema required if all properties are optional --- internal/schema/modules.go | 4 +++- internal/schema/processors.go | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/schema/modules.go b/internal/schema/modules.go index 7e69f4c..3e188ed 100644 --- a/internal/schema/modules.go +++ b/internal/schema/modules.go @@ -43,7 +43,9 @@ func GetModulesSchema() *jsonschema.Schema { } if mod.ParamsSchema != nil { moduleSchema.Properties["params"] = mod.ParamsSchema - moduleSchema.Required = append(moduleSchema.Required, "params") + if len(mod.ParamsSchema.Required) > 0 { + moduleSchema.Required = append(moduleSchema.Required, "params") + } } moduleDefinitionSchemas = append(moduleDefinitionSchemas, moduleSchema) } diff --git a/internal/schema/processors.go b/internal/schema/processors.go index 35920a2..25151c9 100644 --- a/internal/schema/processors.go +++ b/internal/schema/processors.go @@ -39,7 +39,9 @@ func GetProcessorsSchema() *jsonschema.Schema { } if proc.ParamsSchema != nil { processorSchema.Properties["params"] = proc.ParamsSchema - processorSchema.Required = append(processorSchema.Required, "params") + if len(proc.ParamsSchema.Required) > 0 { + processorSchema.Required = append(processorSchema.Required, "params") + } } processorDefinitionSchemas = append(processorDefinitionSchemas, processorSchema) }