Skip to content
Snippets Groups Projects
Commit b0b5db83 authored by Alvaro Cabrera's avatar Alvaro Cabrera
Browse files

Merge branch 'develop'

parents 1aad4003 5cee8c56
Branches
Tags
No related merge requests found
{ {
"name": "json-schema-faker", "name": "json-schema-faker",
"version": "0.1.6", "version": "0.1.7",
"description": "JSON-Schema + Faker", "description": "JSON-Schema + Faker",
"main": "lib/index.js", "main": "lib/index.js",
"author": { "author": {
...@@ -14,17 +14,17 @@ ...@@ -14,17 +14,17 @@
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"clone": "^0.1.19", "clone": "^0.1.19",
"glob": "^4.3.5", "glob": "^4.5.3",
"grunt": "^0.4.5", "grunt": "^0.4.5",
"grunt-parts": "^0.3.1", "grunt-parts": "^0.4.0",
"jayschema": "^0.3.1", "jayschema": "^0.3.1",
"semver": "^4.2.0", "semver": "^4.2.0",
"tv4": "^1.1.9", "tv4": "^1.1.9",
"z-schema": "^3.3.1" "z-schema": "^3.9.5"
}, },
"dependencies": { "dependencies": {
"chance": "^0.7.4", "chance": "^0.7.4",
"deref": "^0.2.8", "deref": "^0.3.0",
"faker": "^2.1.2", "faker": "^2.1.2",
"randexp": "^0.4.0" "randexp": "^0.4.0"
} }
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
"description": "sub-schema mixins", "description": "sub-schema mixins",
"schemas": [ "schemas": [
{ {
"id": "#",
"type": "object", "type": "object",
"definitions": { "definitions": {
"inner": { "inner": {
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
{ {
"description": "should handle internal $refs", "description": "should handle internal $refs",
"schema": { "schema": {
"id": "#",
"definitions": { "definitions": {
"integer": { "integer": {
"type": "integer" "type": "integer"
......
fs = require('fs') fs = require('fs')
glob = require('glob') glob = require('glob')
deref = require('deref')
jsfaker = require('../lib') jsfaker = require('../lib')
require('./formats').register(jsfaker) require('./formats').register(jsfaker)
...@@ -54,10 +53,7 @@ glob.sync("#{__dirname}/**/*.json").forEach (file) -> ...@@ -54,10 +53,7 @@ glob.sync("#{__dirname}/**/*.json").forEach (file) ->
expect(error).toMatch new RegExp('^' + test.throws + '$', 'i') expect(error).toMatch new RegExp('^' + test.throws + '$', 'i')
if test.valid if test.valid
schema = deref.util.normalizeSchema(schema)
try try
refs = [schema] if schema.id
expect(sample).toHaveSchema schema, refs expect(sample).toHaveSchema schema, refs
catch e catch e
console.log JSON.stringify(schema, null, 2) console.log JSON.stringify(schema, null, 2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment