Closed Uzlopak closed 2 years ago
@mcollina
Can you please assign somebody who knows how to Implement the on Route typings?
@climba03003 gave me some hints. Will adapt them when i am back at a Computer.
Fixed.
I actually would have preferred to have the same syntax as fastify does. Which would have been
type Options = {
ajv: {
customOptions: AjvOptions;
plugins: (Function | [Function, unknown])[]
}
}
But this should be fine also...
If you are willing to make a major version release then i would like to put the ajvOptions into the customOptions key, to make it 100% identical to the request validation.
If you are willing to make a major version release then i would like to put the ajvOptions into the customOptions key, to make it 100% identical to the request validation.
We should land the refactor first. Then go on for the options consistency in fastify
and plugin
.
I love to see the ajv
options is consistence across fastify
ecosystem.
Should we integrate this into fastify core on the long run?
Should we integrate this into fastify core on the long run?
No, I don't think so. I must say that validating the response is fine only in very rare cases in my opinion and should not be the default
Resolves #42
I dont know how to add typings for the onRoute option.
Any suggestions?
Checklist
npm run test
andnpm run benchmark