Closed itacode closed 2 years ago
Hi @itacode , glad to see this package helps you.
The reason that you't not getting any validation error for requests coming to /health/validator
is that it's actually not the same path as /health/validator/{int}
, so it's not being validated.
But still fastify should return 404. Isn't that the case for you?
@kobik Thank you, now I have understood specifying required: true
for it has no meaning. Yes it returns 404 as it should.
First of all thank you for this very useful middleware.
In the OAS I have the following path with
int
parameter required, but if I make a request without it (/health/validator/
) I get 200 instead of the expected validation error. Is there a way to get it validated as required?OAS:
I am using fastify with fastify-multer and your openapi-validator-middleware. This is a package.json extract:
And this is the related app code: