Skip to content

Commit

Permalink
fix: use ajv for schema ref resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-tymoshenko committed Jun 19, 2022
1 parent ce030d0 commit 376ac1c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/error-serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class Serializer {
}

function anonymous0 (input) {
// main
// #

var obj = (input && typeof input.toJSON === 'function')
? input.toJSON()
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
"eslint-plugin-n": "^15.2.0",
"eslint-plugin-promise": "^6.0.0",
"fast-json-body": "^1.1.0",
"fast-json-stringify": "^4.2.0",
"fast-json-stringify": "ivan-tymoshenko/fast-json-stringify#use-ajv-for-schema-ref-resolving",
"fastify-plugin": "^3.0.1",
"fluent-json-schema": "^3.1.0",
"form-data": "^4.0.0",
Expand Down Expand Up @@ -179,7 +179,7 @@
"dependencies": {
"@fastify/ajv-compiler": "^3.1.0",
"@fastify/error": "^3.0.0",
"@fastify/fast-json-stringify-compiler": "^3.0.1",
"@fastify/fast-json-stringify-compiler": "ivan-tymoshenko/fast-json-stringify-compiler#use-ajv-for-schema-ref-resolving",
"abstract-logging": "^2.0.1",
"avvio": "^8.1.3",
"find-my-way": "^6.3.0",
Expand Down
2 changes: 1 addition & 1 deletion test/schema-feature.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ test('Should throw of the schema does not exists in output', t => {

fastify.ready(err => {
t.equal(err.code, 'FST_ERR_SCH_SERIALIZATION_BUILD')
t.match(err.message, /^Failed building the serialization schema for GET: \/:id, due to error Cannot read propert.*/) // error from fast-json-strinfigy
t.match(err.message, /^Failed building the serialization schema for GET: \/:id, due to error Cannot find reference.*/) // error from fast-json-strinfigy
})
})

Expand Down

0 comments on commit 376ac1c

Please sign in to comment.