Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 1.86 KB

README.md

File metadata and controls

42 lines (29 loc) · 1.86 KB

jsvrx-djv

RxJS operators to validate/discriminate data objects using JSON Schema(s) and Dynamic JSON Schema Validator.

Build Status Coverage Status npm djv npm bundle size Top Language MIT License

Install

npm i jsvrx-djv

Install Djv if you don't have it installed already.

npm i 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.discriminator(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.