jhm-ciberman/docs_gm

View on GitHub
src/SchemaValidator.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { injectable } from "inversify";
import { Validator } from "jsonschema";

@injectable()
export default class SchemaValidator {
    public validate(data: any, schema: any): void {
        const validator = new Validator();
        validator.validate(data, schema, {throwError: true});
    }
}