2.0.0 • Published 3 years ago
jsvrx-djv v2.0.0
jsvrx-djv
RxJS operators to validate/discriminate data objects using JSON Schema(s) and Dynamic JSON Schema Validator.
Install
npm i jsvrx-djv
Usage
DjvDataValidtor
is DataValidator
interface implementation using Djv.
For more information about DataValidation
interface and usage examples see jsvrx.
Create a new DjvDataValidator
instance by passing a djv
instance as the constructor's parameter.
import djv from 'djv';
import { DjvDataValidator } from { jsvrx-djv }
const djvVD = new djv();
djvVD.useVersion('draft-06');
const dv = new DjvDataValidator(djvVD);
DjvDataValidator.discriminate(ids: JSONSchemaID[], inv?: JSONSchemaID)
implementation doesn't provide optimized validation for multiple JSON Schemas. It executes single JSON Schema validation attempts in ids
array order. Fill the ids
array accordingly.