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

fix: use ajv for schema ref resolving #4049

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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": "^5.0.0",
"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": "^4.0.0",
"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