mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-09-11 07:59:25 +00:00
move schema package out of internal
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/google/jsonschema-go/jsonschema"
|
||||
)
|
||||
|
||||
var RoutesConfigSchema = jsonschema.Schema{
|
||||
Schema: "https://json-schema.org/draft/2020-12/schema",
|
||||
ID: "https://showbridge.io/routes.schema.json",
|
||||
Title: "Routes",
|
||||
Description: "route configurations",
|
||||
Type: "array",
|
||||
Items: &jsonschema.Schema{
|
||||
Type: "object",
|
||||
Properties: map[string]*jsonschema.Schema{
|
||||
"id": {
|
||||
Type: "string",
|
||||
MinLength: new(1),
|
||||
},
|
||||
"input": {
|
||||
Type: "string",
|
||||
MinLength: new(1),
|
||||
},
|
||||
"processors": {
|
||||
Ref: "https://showbridge.io/processors.schema.json",
|
||||
},
|
||||
},
|
||||
Required: []string{"id", "input"},
|
||||
AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}},
|
||||
},
|
||||
Default: json.RawMessage(`[]`),
|
||||
}
|
||||
Reference in New Issue
Block a user