[X] I have searched existing issues to ensure the bug has not already been reported
Fastify version
4.26.x
Plugin version
8.14.x
Node.js version
20.x
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
All
Description
The config object for routes in fastify is typed liberally: it is a union with unknown and you can use it to store arbitrary configuration. However, this module specifies a concrete type for the config option that breaks extensions:
Prerequisites
Fastify version
4.26.x
Plugin version
8.14.x
Node.js version
20.x
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
All
Description
The
config
object for routes in fastify is typed liberally: it is a union withunknown
and you can use it to store arbitrary configuration. However, this module specifies a concrete type for the config option that breaks extensions:https://github.com/fastify/fastify-swagger/blob/352f7d6c235445731e9843c1f83f313d5320992e/index.d.ts#L56-L58
Steps to Reproduce
Online repro: https://stackblitz.com/edit/node-59kmye?file=package.json,index.ts
Expected Behavior
It should be possible to use fastify-swagger without overwriting config types.