mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-27 05:15:47 +00:00
validate config updates via cmd and api with schema
This commit is contained in:
@@ -8,9 +8,7 @@ import (
|
||||
)
|
||||
|
||||
func GetResolvedConfigSchema() (*jsonschema.Resolved, error) {
|
||||
configSchema := ConfigSchema
|
||||
|
||||
return configSchema.Resolve(&jsonschema.ResolveOptions{
|
||||
return ConfigSchema.Resolve(&jsonschema.ResolveOptions{
|
||||
Loader: func(uri *url.URL) (*jsonschema.Schema, error) {
|
||||
switch uri.String() {
|
||||
case "https://showbridge.io/modules.schema.json":
|
||||
@@ -23,5 +21,6 @@ func GetResolvedConfigSchema() (*jsonschema.Resolved, error) {
|
||||
return nil, fmt.Errorf("unknown schema reference: %s", uri.String())
|
||||
}
|
||||
},
|
||||
ValidateDefaults: true,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user