diff options
Diffstat (limited to 'src/ts')
-rw-r--r-- | src/ts/utils/schema_validator.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ts/utils/schema_validator.ts b/src/ts/utils/schema_validator.ts index 1cbffee58..bd2f97d2b 100644 --- a/src/ts/utils/schema_validator.ts +++ b/src/ts/utils/schema_validator.ts @@ -1,14 +1,14 @@ -import {Validator as V, ValidatorResult} from 'jsonschema'; +import {Validator, ValidatorResult} from 'jsonschema'; import {ECSignatureSchema, ECSignatureParameter} from '../schemas/ec_signature_schema'; export class SchemaValidator { - private v: V; + private validator: Validator; constructor() { - this.v = new V(); - this.v.addSchema(ECSignatureParameter, ECSignatureParameter.id); - this.v.addSchema(ECSignatureSchema, ECSignatureSchema.id); + this.validator = new Validator(); + this.validator.addSchema(ECSignatureParameter, ECSignatureParameter.id); + this.validator.addSchema(ECSignatureSchema, ECSignatureSchema.id); } public validate(instance: object, schema: Schema): ValidatorResult { - return this.v.validate(instance, schema); + return this.validator.validate(instance, schema); } } |