fastify / fastify/help

Help

Open
#1,085 1 comment 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
No language data
Stars
68
Forks
8
Avg merge
11h 2m
Merged PRs (30d)
2

Description

## 💬 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](https://github.com/user-attachments/assets/7e807384-ac82-4f47-9dd3-f7e15c490542)

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

![Image](https://github.com/user-attachments/assets/92336299-7463-4727-92db-812e8b69a13f)

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.