add id field to route and processor

This commit is contained in:
Joel Wetzell
2026-08-11 20:39:54 -05:00
parent a3926d980b
commit 848e644a9f
6 changed files with 25 additions and 6 deletions
+5 -1
View File
@@ -24,11 +24,15 @@ func GetProcessorsSchema() *jsonschema.Schema {
ID: proc.Type,
Type: "object",
Properties: map[string]*jsonschema.Schema{
"id": {
Type: "string",
MinLength: new(1),
},
"type": {
Const: jsonschema.Ptr[any](proc.Type),
},
},
Required: []string{"type"},
Required: []string{"id", "type"},
AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}},
}
if proc.Title != "" {
+5 -1
View File
@@ -15,6 +15,10 @@ var RoutesConfigSchema = jsonschema.Schema{
Items: &jsonschema.Schema{
Type: "object",
Properties: map[string]*jsonschema.Schema{
"id": {
Type: "string",
MinLength: new(1),
},
"input": {
Type: "string",
MinLength: new(1),
@@ -23,7 +27,7 @@ var RoutesConfigSchema = jsonschema.Schema{
Ref: "https://showbridge.io/processors.schema.json",
},
},
Required: []string{"input"},
Required: []string{"id", "input"},
AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}},
},
Default: json.RawMessage(`[]`),