[X] I have searched existing issues to ensure the bug has not already been reported
Fastify version
-
Plugin version
No response
Node.js version
18.12.1
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
13.0
Description
I get type error when passing a JSON schema to register option openapi.components.schema. (I create the json schema using Typebox)
fastify-swagger is using openapi-types for TS type. But we(fastify-swagger) don't have their change that they've made for OpenApi 3.1 https://github.com/kogosoftwarellc/open-api/pull/757 and now they have OpenAPIV3_1.Document.
Prerequisites
Fastify version
-
Plugin version
No response
Node.js version
18.12.1
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
13.0
Description
I get type error when passing a JSON schema to register option
openapi.components.schema
. (I create the json schema using Typebox)fastify-swagger is using openapi-types for TS type. But we(fastify-swagger) don't have their change that they've made for OpenApi 3.1 https://github.com/kogosoftwarellc/open-api/pull/757 and now they have
OpenAPIV3_1.Document
.So we would need to apply this to here https://github.com/fastify/fastify-swagger/blob/49f16423a5d7b0b315d8c145d8fbda9ef11f6b37/index.d.ts#L116 somehow, using OR or something.
Steps to Reproduce
Try this on TS playground
Also, it's reproducible when passing this object to
openapi.components.schema
option onfastify.register
.Expected Behavior
No response