validate config updates via cmd and api with schema

This commit is contained in:
Joel Wetzell
2026-03-23 20:12:26 -05:00
parent 9a50ca8cfe
commit 13f7b9e927
4 changed files with 71 additions and 21 deletions

View File

@@ -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,
})
}