Schemas in Fastify follow the JSON-Schema standard. For this reason we have opted to not ship strict schema based types. Instead we provide an example in our documentation on how to solve this problem. Check it out here: https://github.com/fastify/fastify/blob/main/docs/Reference/TypeScript.md#json-schema

interface FastifySchema {
    body?: unknown;
    headers?: unknown;
    params?: unknown;
    querystring?: unknown;
    response?: unknown;
}

Properties

body?: unknown
headers?: unknown
params?: unknown
querystring?: unknown
response?: unknown