Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for ajv v6 #19

Closed
ShaharHD opened this issue Jan 9, 2018 · 1 comment
Closed

Update for ajv v6 #19

ShaharHD opened this issue Jan 9, 2018 · 1 comment

Comments

@ShaharHD
Copy link

ShaharHD commented Jan 9, 2018

Gives out an error:

error: uncaughtException: can't resolve reference http://json-schema.org/draft-06/schema#

Using the library in TypeScript v2.5

the following code produce the error:

import * as Ajv from 'ajv';
import * as AjvAsync from 'ajv-async';

import * as AjvKeywords from 'ajv-keywords';
import * as AjvMergePatch from 'ajv-merge-patch';

export const ajv = AjvAsync(new Ajv({
  coerceTypes: 'array',
  jsonPointers: true,
  allErrors: true,
  $data: true,
  removeAdditional: true,
}));

AjvMergePatch(ajv);
AjvKeywords(ajv);
@epoberezkin epoberezkin changed the title Package not compatible with ajv v6 Update for ajv v6 Jan 9, 2018
@epoberezkin
Copy link
Member

To work around you can just add meta-schema for draft-06. See https://github.com/epoberezkin/ajv#using-version-6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants