Prerequisites
Fastify version
4.28.0
Plugin version
2.6.0
Node.js version
20.15.0
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
ubuntu
Description
The plugin is failing the schema validation when there is a $ref in the response object.
In the sample code provided you can see it working without the plugin and also when the response doesn't get a $ref.
I'm using TypeBox for schema generation, but it doesn't matter. Even if you write it a plain object it continues failing.
Link to code that reproduces the bug
https://github.com/jpenna/fastify-response-error
Expected Behavior
It shouldn't crash the build.
Prerequisites
Fastify version
4.28.0
Plugin version
2.6.0
Node.js version
20.15.0
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
ubuntu
Description
The plugin is failing the schema validation when there is a
$refin theresponseobject.In the sample code provided you can see it working without the plugin and also when the
responsedoesn't get a$ref.I'm using TypeBox for schema generation, but it doesn't matter. Even if you write it a plain object it continues failing.
Link to code that reproduces the bug
https://github.com/jpenna/fastify-response-error
Expected Behavior
It shouldn't crash the build.