Merge pull request #166 from jwetzell/fix/params-schema-required

don't make params schema required if all properties are optional
This commit is contained in:
Joel Wetzell
2026-05-20 17:30:28 -05:00
committed by GitHub
2 changed files with 6 additions and 2 deletions
+2
View File
@@ -43,8 +43,10 @@ func GetModulesSchema() *jsonschema.Schema {
}
if mod.ParamsSchema != nil {
moduleSchema.Properties["params"] = mod.ParamsSchema
if len(mod.ParamsSchema.Required) > 0 {
moduleSchema.Required = append(moduleSchema.Required, "params")
}
}
moduleDefinitionSchemas = append(moduleDefinitionSchemas, moduleSchema)
}
schema.Items = &jsonschema.Schema{
+2
View File
@@ -39,8 +39,10 @@ func GetProcessorsSchema() *jsonschema.Schema {
}
if proc.ParamsSchema != nil {
processorSchema.Properties["params"] = proc.ParamsSchema
if len(proc.ParamsSchema.Required) > 0 {
processorSchema.Required = append(processorSchema.Required, "params")
}
}
processorDefinitionSchemas = append(processorDefinitionSchemas, processorSchema)
}
schema.Items = &jsonschema.Schema{