Skip to content

Commit

Permalink
Merge pull request #170 from hckrnews/feature/finetune-error-message
Browse files Browse the repository at this point in the history
Stringify the schema in the error value
  • Loading branch information
w3nl authored Mar 31, 2022
2 parents 2109351 + 4dd1ae6 commit 3b6d1de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@hckrnews/objects",
"description": "Create valid JavaScript objects",
"version": "4.0.0",
"version": "4.0.1",
"author": {
"name": "Pieter Wigboldus",
"url": "https://hckr.news/"
Expand Down
6 changes: 3 additions & 3 deletions src/objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ const ObjectGenerator = ({ schema } = {}) =>
field: `${path}.${subField}`,
type: subTypeName,
invalidData,
schema,
schema: JSON.stringify(schema),
data: this.original,
},
me: this.constructor,
Expand Down Expand Up @@ -188,7 +188,7 @@ const ObjectGenerator = ({ schema } = {}) =>
field,
type,
invalidData,
schema,
schema: JSON.stringify(schema),
data: this.original,
},
me: this.constructor,
Expand All @@ -202,7 +202,7 @@ const ObjectGenerator = ({ schema } = {}) =>
field,
type: type.name,
invalidData,
schema,
schema: JSON.stringify(schema),
data: this.original,
},
me: this.constructor,
Expand Down

0 comments on commit 3b6d1de

Please sign in to comment.