Skip to content

Help #1085

@scotty-rdn

Description

@scotty-rdn

💬 Question here

I feel like this should be covered somewhere in documentation, but if it is I keep missing it.

I'm trying to use Fastify, TypeBox, and FastifyTypeBoxProvider.

I create my schemas. If I pass the Schema directly to the route() method, the types are provided successfully in the handler

Image

However, if I try to add the schema to the Fastify Instance and reference it there, it no longer works.

Image

I am also using @fastify/swagger and @fastify/swagger-ui, and that is being generated with the type references intact.

Is this just not something that can be supported by TypeBoxTypeProvider?

Your Environment

  • node version: 22
  • fastify version: "^5.2.1"
  • os: Mac

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions