fastify / fastify/fastify-funky
RouteHandlerMethod override breaks TypeProviders
- Dominant language
- JavaScript
- Stars
- 87
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
### Prerequisites
- [X] I have written a descriptive issue title
- [X] I have searched existing issues to ensure the bug has not already been reported
### Fastify version
4.12.0
### Plugin version
3.0.0
### Node.js version
16.14.2
### Operating system
Linux
### Operating system version (i.e. 20.04, 11.3, 10)
22.04
### Description
The `RouteHandlerMethod` override added in #50 omits the last three generic parameters (`SchemaCompiler`, `TypeProvider` and `Logger`) likely because it was made prior to https://github.com/fastify/fastify/pull/3398
This restricts the TypeProvider type to always be `FastifyTypeProviderDefault` resulting in all schema types being `unknown`
### Steps to Reproduce
I've made a [Typescript Playground where you can test out the issue](https://www.typescriptlang.org/play?target=7&module=1&ts=4.9.4#code/JYWwDg9gTgLgBAMQIYGcbAGYE8A0cDeiq62AQqgKYAyEA5rRVHsmplgJIB2aSnAxhTwAlJAHchFMABssAEQoYkAVykwAogA8wUCihTAInYWIkBHJbpjzFK9Vp16DRuCNEBlRgDdG15argAvnAYUBAgcADkiqzYEQDcALAAUKCQsARwACpYYBSkEBrZuQAKoZ7AACaMgcGh4QBEAALRJFgA9DA5FAC02hDlVVDdnbkARgX1iSng0PCERRQ1IWGRjfr8UkjAUB1d4xrxyW1tcACq-GEgFJzwMBBwozpIANZwwPCAvBuA4jt4OiG6AAs4Hc4EpOI8KC8jidUrMMi02Agwc8sEs6qsEdg2hhkVhDklknxDGhgsQ2HAALxEGJYAAUAEoAHSid4AhalfqVRgAHgW+UKXQ5A0YAD4GVNoXB5HxNjo4Eg4KElDAKMlMVhGZA0LSIm0IjhkvhknA4Cg+ACKCAkAAuAjGk0PCAVLC2haMgDyowAVhQ+DBaUakg6HRpXV1GW4YFBgJxaAyDUHg3AXVlwwA5JQgUaMeP24MALzDuUZ+QgUkhnFziZNAXpCZrCYCeBx-HQhjgtJ05ksv0kMnpdsTXYsaEZ42djI0cGOpoBEBUFTgAKQ3mBXTgkejsftOmkGpQ1wqAaXFCkUggtoiomgUgqEUC9OStaAA).
### Expected Behavior
The type provider declared by `withTypeProvider` should be used in the route handler.
Contributor guide
Assessment
This issue has not been assessed yet.