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

Package detail

@0xproject/json-schemas

0xProject4kApache-2.01.0.7TypeScript support: included

0x-related json schemas

readme

@0xproject/json-schemas

Contains 0x-related json schemas

Read the Documentation.

Installation

yarn add @0xproject/json-schemas

Import

import { SchemaValidator, ValidatorResult, schemas } from '@0xproject/json-schemas';

or

var schemas = require('@0xproject/json-schemas').schemas;

If your project is in TypeScript, add the following to your tsconfig.json:

"compilerOptions": {
    "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
}

Contributing

We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.

Please read our contribution guidelines before getting started.

Install dependencies

If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:

yarn config set workspaces-experimental true

Then install dependencies

yarn install

Build

To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:

PKG=@0xproject/json-schemas yarn build

Or continuously rebuild on change:

PKG=@0xproject/json-schemas yarn watch

Clean

yarn clean

Lint

yarn lint

Run Tests

yarn test

changelog

CHANGELOG

v1.0.7 - October 4, 2018

* Dependencies updated

v1.0.6 - October 2, 2018

* Dependencies updated

v1.0.5 - September 28, 2018

* Dependencies updated

v1.0.4 - September 25, 2018

* Dependencies updated

v1.0.3 - September 25, 2018

* Dependencies updated

v1.0.2 - September 21, 2018

* Dependencies updated

v1.0.1 - September 5, 2018

* Dependencies updated

v1.0.1-rc.6 - August 27, 2018

* Dependencies updated

v1.0.1-rc.5 - August 24, 2018

* Update incorrect relayer api fee recipients response schema (#974)

v1.0.1-rc.4 - August 13, 2018

* Allow for additional properties in txData schema (#938)
* Change hexSchema to match `0x` (#937)
* Upgrade Relayer API schemas for relayer API V2 (#916)

v1.0.1-rc.3 - July 26, 2018

* Dependencies updated

v1.0.1-rc.2 - July 26, 2018

* Dependencies updated

v1.0.1-rc.1 - July 26, 2018

* Dependencies updated

v1.0.0 - July 23, 2018

* Dependencies updated

v1.0.0-rc.1 - July 19, 2018

* Update schemas for V2 or 0x Protocol (#615)
* Added CallData schema (#821)
* Update CallData schema id to CallData (#894)

v0.8.3 - July 18, 2018

* Dependencies updated

v0.8.2 - July 9, 2018

* Dependencies updated

v0.8.1 - June 19, 2018

* Dependencies updated

v0.8.0 - May 22, 2018

* Update Order & SignedOrder schemas, remove ECSignature schema and add Hex schema as part of V2 upgrades (#615)

v0.7.24 - May 22, 2018

* Dependencies updated

v0.7.23 - May 4, 2018

* Dependencies updated

v0.7.22 - May 4, 2018

* Dependencies updated

v0.7.21 - April 18, 2018

* Dependencies updated

v0.7.20 - April 11, 2018

* Dependencies updated

v0.7.19 - April 2, 2018

* Dependencies updated

v0.7.18 - April 2, 2018

* Dependencies updated

v0.7.13 - February 8, 2018

*   Fix publishing issue where .npmignore was not properly excluding undesired content (#389)

v0.7.0 - December 19, 2017

* Rename `subscriptionOptsSchema` to `blockRangeSchema` (#272)

v0.6.7 - November 13, 2017

* Re-publish JSON-schema previously published under NPM package 0x-json-schemas