Relaxed Schema constraints in Auths
MODIFY
src/storage/validator/AuthorizationValidatorStorage.ts
src/storage/validator/AuthorizationValidatorStorage.ts
@@ -9,7 +9,14 @@ export default class AuthorizationValidatorStorage extends SchemaValidator {
private authorizationRoleSave: Schema = JSON.parse(fs.readFileSync(`${global.appRoot}/assets/storage/schemas/authorization/authorization-role-save.json`, 'utf8'));
private constructor() {
- super('AuthorizationValidatorStorage');
+ super('AuthorizationValidatorStorage', {
+ strict: false, // When 'true', it fails with anyOf required fields: https://github.com/ajv-validator/ajv/issues/1571
+ allErrors: true,
+ removeAdditional: false, // 'all' fails with anyOf documents: Manually added 'additionalProperties: false' in schema due filtering of data in anyOf/oneOf/allOf array (it's standard): https://github.com/ajv-validator/ajv/issues/1784
+ allowUnionTypes: true,
+ coerceTypes: true,
+ verbose: true,
+ });
}
public static getInstance(): AuthorizationValidatorStorage {

Relaxed Schema constraints in Auths