Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

0x-json-schemas

0xProject75Apache-2.0deprecated0.6.6TypeScript support: included

This package is now published as @0xproject/json-schemas. Please remove this dependency and install the new one.

0x-related json schemas

readme

json-schemas CircleCI

Contains 0x-related json schemas

Usage:

import {SchemaValidator, ValidatorResult, schemas} from '0x-json-schemas';

const {orderSchema} = schemas;
const validator = new SchemaValidator();

const order = {
    ...
};
const validatorResult: ValidatorResult = validator.validate(order, orderSchema); // Contains all errors
const isValid: boolean = validator.isValid(order, orderSchema); // Only returns boolean