mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-09-10 07:29:25 +00:00
add id field to route and processor
This commit is contained in:
@@ -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 != "" {
|
||||
|
||||
@@ -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(`[]`),
|
||||
|
||||
Reference in New Issue
Block a user