mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 23:51:23 +00:00
fix(config): accept $schema key in root config (#15280)
* fix(config): accept $schema key in root config (#14998) * fix: strip $schema via preprocess to avoid spurious UI section * fix(config): allow root without zod preprocess wrapper --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
@@ -303,6 +303,12 @@ function stripChannelSchema(schema: ConfigSchema): ConfigSchema {
|
||||
if (!root || !root.properties) {
|
||||
return next;
|
||||
}
|
||||
// Allow `$schema` in config files for editor tooling, but hide it from the
|
||||
// Control UI form schema so it does not show up as a configurable section.
|
||||
delete root.properties.$schema;
|
||||
if (Array.isArray(root.required)) {
|
||||
root.required = root.required.filter((key) => key !== "$schema");
|
||||
}
|
||||
const channelsNode = asSchemaObject(root.properties.channels);
|
||||
if (channelsNode) {
|
||||
channelsNode.properties = {};
|
||||
|
||||
Reference in New Issue
Block a user