diff --git a/README.md b/README.md index f2f546f..bf31141 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ Command line interface for [ajv](https://github.com/epoberezkin/ajv), one of the [fastest json schema validators](https://github.com/ebdrup/json-schema-benchmark). [![Build Status](https://travis-ci.org/jessedc/ajv-cli.svg?branch=master)](https://travis-ci.org/jessedc/ajv-cli) -[![npm version](https://badge.fury.io/js/ajv-cli.svg)](https://www.npmjs.com/package/ajv-cli) -[![Code Climate](https://codeclimate.com/github/epoberezkin/ajv-cli/badges/gpa.svg)](https://codeclimate.com/github/epoberezkin/ajv-cli) +[![npm](https://img.shields.io/npm/v/ajv-cli.svg)](https://www.npmjs.com/package/ajv-cli) [![Coverage Status](https://coveralls.io/repos/github/jessedc/ajv-cli/badge.svg?branch=master)](https://coveralls.io/github/jessedc/ajv-cli?branch=master) +[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv) ## Contents diff --git a/commands/ajv.js b/commands/ajv.js index 724401a..db9a1f8 100644 --- a/commands/ajv.js +++ b/commands/ajv.js @@ -8,10 +8,12 @@ var path = require('path'); module.exports = function (argv) { var opts = options.get(argv); + opts.schemaId = 'auto'; if (argv.o) opts.sourceCode = true; var ajv = new Ajv(opts); var invalid; ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); + ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json')); addSchemas(argv.m, 'addMetaSchema', 'meta-schema'); addSchemas(argv.r, 'addSchema', 'schema'); customFormatsKeywords(argv.c); diff --git a/package.json b/package.json index cd6d60f..f4bb44a 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "url": "https://github.com/jessedc/ajv-cli" }, "dependencies": { - "ajv": "^5.0.0", + "ajv": "^6.0.0", "ajv-pack": "^0.3.0", "fast-json-patch": "^0.5.6", "glob": "^7.0.3", @@ -38,7 +38,7 @@ "minimist": "^1.2.0" }, "devDependencies": { - "ajv-keywords": "^2.0.0", + "ajv-keywords": "^3.0.0", "coveralls": "^2.11.8", "eslint": "^2.4.0", "mocha": "^2.4.5", diff --git a/test/custom/schema.json b/test/custom/schema.json index 5cfea1e..164b614 100644 --- a/test/custom/schema.json +++ b/test/custom/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-06/schema#", - "id": "schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "schema.json", "typeof": "number" } diff --git a/test/meta/meta_schema.json b/test/meta/meta_schema.json index b6ef85e..d6f3c16 100644 --- a/test/meta/meta_schema.json +++ b/test/meta/meta_schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-06/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://example.com/my_meta_schema#", "title": "Core schema meta-schema", "definitions": { diff --git a/test/schema.json b/test/schema.json index d1db81d..b660fdc 100644 --- a/test/schema.json +++ b/test/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-06/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", "$id": "schema.json", "description": "basic schema from z-schema benchmark (https://github.com/zaggino/z-schema)", "title": "Product set",