mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-14 13:23:26 +02:00
fix(config): restore applyDefaults:true for AJV plugin/channel schema validation
This commit is contained in:
committed by
Peter Steinberger
parent
318c0f2e89
commit
92ffb9af86
@@ -766,7 +766,8 @@ function validateConfigObjectWithPluginsBase(
|
||||
schema: channelSchema,
|
||||
cacheKey: `channel:${trimmed}`,
|
||||
value: config.channels[trimmed],
|
||||
applyDefaults: opts.applyDefaults,
|
||||
applyDefaults: true, // Always apply defaults for AJV schema validation;
|
||||
// writeConfigFile persists persistCandidate, not validated.config (#61841)
|
||||
});
|
||||
if (!result.ok) {
|
||||
for (const error of result.errors) {
|
||||
@@ -957,7 +958,8 @@ function validateConfigObjectWithPluginsBase(
|
||||
schema: record.configSchema,
|
||||
cacheKey: record.schemaCacheKey ?? record.manifestPath ?? pluginId,
|
||||
value: entry?.config ?? {},
|
||||
applyDefaults: opts.applyDefaults,
|
||||
applyDefaults: true, // Always apply defaults for AJV schema validation;
|
||||
// writeConfigFile persists persistCandidate, not validated.config (#61841)
|
||||
});
|
||||
if (!res.ok) {
|
||||
for (const error of res.errors) {
|
||||
|
||||
Reference in New Issue
Block a user