Compare commits
1 Commits
f96476bd23
...
fix/valida
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13d1f83a85 |
@@ -95,11 +95,19 @@ class ValidationUtils {
|
||||
// Validate each key in the schema and loop over wildcards if they are not in schema
|
||||
for ( const key in schema ) {
|
||||
|
||||
if (key === "rules" || key === "description" || key === "schema") {
|
||||
if (key === "rules" || key === "description" || key === "schema" || key === "version") {
|
||||
continue;
|
||||
}
|
||||
|
||||
const fieldSchema = schema[key];
|
||||
|
||||
// Skip non-object schema entries (e.g. primitive values injected by migration)
|
||||
if (fieldSchema === null || typeof fieldSchema !== 'object') {
|
||||
this.logger.debug(`${name}.${key} has a non-object schema entry (${typeof fieldSchema}). Skipping.`);
|
||||
validatedConfig[key] = fieldSchema;
|
||||
continue;
|
||||
}
|
||||
|
||||
const { rules = {} } = fieldSchema;
|
||||
|
||||
// Default to the schema's default value if the key is missing
|
||||
|
||||
Reference in New Issue
Block a user