npm
npmjs.com › package › fastify-type-provider-zod
fastify-type-provider-zod - npm
October 24, 2025 - Zod Type Provider for Fastify@5. Latest version: 7.0.0, last published: a month ago. Start using fastify-type-provider-zod in your project by running `npm i fastify-type-provider-zod`. There are 182 other projects in the npm registry using fastify-type-provider-zod.
» npm install fastify-type-provider-zod
Published Jun 24, 2026
Version 7.0.0
Fastify
fastify.dev › reference › type-providers
Type-Providers | Fastify
The following sets up a Zod Type Provider: $ npm i zod @fastify/type-provider-zod ·
npm
npmjs.com › package › @marcalexiei › fastify-type-provider-zod
@marcalexiei/fastify-type-provider-zod - npm
December 9, 2025 - By combining Zod with Fastify’s type providers, this package bridges the gap between static typing and runtime schema enforcement.
» npm install @marcalexiei/fastify-type-provider-zod
Published Dec 09, 2025
Version 3.0.0
npm
npmjs.com › package › @bram-dc › fastify-type-provider-zod
@bram-dc/fastify-type-provider-zod - npm
January 25, 2026 - import type { ZodTypeProvider } from 'fastify-type-provider-zod'; import { serializerCompiler, validatorCompiler } from 'fastify-type-provider-zod'; import { z } from 'zod/v4'; const app = Fastify(); // Add schema validator and serializer app.setValidatorCompiler(validatorCompiler); app.setSerializerCompiler(serializerCompiler); app.withTypeProvider<ZodTypeProvider>().route({ method: 'GET', url: '/', // Define your schema schema: { querystring: z.object({ name: z.string().min(4), }), response: { 200: z.string(), }, }, handler: (req, res) => { res.send(req.query.name); }, }); app.listen({ port: 4949 });
» npm install @bram-dc/fastify-type-provider-zod
Published Jan 25, 2026
Version 7.0.1
Author turkerd
GitHub
github.com › turkerdev › fastify-type-provider-zod
GitHub - turkerdev/fastify-type-provider-zod · GitHub
Fastify dispatches serialization per content type — set the response Content-Type header in the handler to select which schema validates the response body: handler: (req, res) => { res.header('Content-Type', 'application/vnd.v1+json'); res.send([{ ...
Author turkerdev
GitHub
github.com › samchungy › fastify-zod-openapi
GitHub - samchungy/fastify-zod-openapi: Fastify plugin for zod-openapi · GitHub
Fastify type provider, validation, serialization and @fastify/swagger support for zod-openapi. ... npm install zod fastify-zod-openapi ## or yarn add zod fastify-zod-openapi ## or pnpm install zod fastify-zod-openapi
Starred by 123 users
Forked by 16 users
Languages TypeScript 99.5% | JavaScript 0.5%
Libraries.io
libraries.io › npm › fastify-type-provider-zod
fastify-type-provider-zod 6.1.0 on npm - Libraries.io - security & maintenance data for open source software
import type { ZodTypeProvider } from 'fastify-type-provider-zod'; import { serializerCompiler, validatorCompiler } from 'fastify-type-provider-zod'; import { z } from 'zod/v4'; const app = Fastify(); // Add schema validator and serializer app.setValidatorCompiler(validatorCompiler); app.setSerializerCompiler(serializerCompiler); app.withTypeProvider<ZodTypeProvider>().route({ method: 'GET', url: '/', // Define your schema schema: { querystring: z.object({ name: z.string().min(4), }), response: { 200: z.string(), }, }, handler: (req, res) => { res.send(req.query.name); }, }); app.listen({ port: 4949 });
Fastify
fastify.dev › reference › typescript
Fastify - Fast and Low Overhead Web Framework
@fastify/type-provider-typebox · And a zod wrapper by a third party called fastify-type-provider-zod · They simplify schema validation setup and you can read more about them in Type Providers page. Below is how to setup schema validation using the typebox, json-schema-to-typescript, and json-schema-to-ts packages without type providers.
npm
npmjs.com › package › fastify-zod
fastify-zod - npm
August 17, 2023 - Shorthand to buildJsonSchema({ [$id]: Type }).schemas[0]. Add schemas to fastify and decorate instance with zod property to add strongly-typed routes (see fastify.zod below).
» npm install fastify-zod
Published Aug 17, 2023
Version 1.4.0
UNPKG
app.unpkg.com › fastify-type-provider-zod@1.1.9 › files › README.md
fastify-type-provider-zod
# Fastify Type Provider Zod [](https://npmjs.org/package/fastify-type-provider-zod) [](https://npmjs.org/package/fastify-type-provider-zod) ...
npm
npmjs.com › package › fastify-zod-openapi
fastify-zod-openapi - npm
app.withTypeProvider<FastifyZodOpenApiTypeProvider>().get( '/', { schema: { querystring: z.object({ jobId: z.string().meta({ description: 'Job ID', example: '60002023', }), }), }, attachValidation: true, }, (req, res) => { if (req.validationError?.validation) { const zodValidationErrors = req.validationError.validation.filter( (err) => err instanceof RequestValidationError, ); console.error(zodValidationErrors); } return res.send(req.query); }, ); app.setErrorHandler((error, _req, res) => { if (error instanceof ResponseSerializationError) { return res.status(500).send({ error: 'Bad response', }); } }); // { // error: 'Bad response'; // } fastify-type-provider-zod: Big kudos to this library for lighting the way with how to create type providers, validators and serializers.
» npm install fastify-zod-openapi
Published Mar 31, 2026
Version 5.6.1
Aikido
intel.aikido.dev › packages › npm › fastify-type-provider-zod
fastify-type-provider-zod - npm package security analysis
Zod Type Provider for Fastify@5 Latest: 6.1.0. 1 vulnerability found.
GitHub
github.com › fastify › fastify-type-provider-zod
GitHub - fastify/fastify-type-provider-zod: A Type Provider for Zod · GitHub
A Type Provider for Zod. ... Starting from v0, this library uses Zod’s .encode() / .decode() APIs introduced in Zod 4.1. Because of this change, response serialization is now based on z.output<T> instead of z.input<T>. import type { ...
Author fastify
Stack Overflow
stackoverflow.com › questions › 79639406 › how-to-avoid-losing-zod-type-provider-generic-with-fastify-autoload
typescript - How to avoid losing Zod type provider generic with Fastify AutoLoad - Stack Overflow
I'm using Fastify with the fastify-type-provider-zod plugin: const fastify = Fastify().withTypeProvider (); And the fastify-autoload plugin: // This loads all plugins defined...
Marcalexiei
marcalexiei.github.io › fastify-type-provider-zod
fastify-type-provider-zod
Zod Type Provider for Fastify@5 · Use Zod schemas to both validate incoming data and infer TypeScript types automatically
UNPKG
unpkg.com › browse › fastify-type-provider-zod@1.1.9 › README.md
UNPKG
# Fastify Type Provider Zod [](https://npmjs.org/package/fastify-type-provider-zod) [](https://npmjs.org/package/fastify-type-provider-zod) ...
GitHub
github.com › samchungy › fastify-zod-openapi › blob › main › README.md
fastify-zod-openapi/README.md at main · samchungy/fastify-zod-openapi
Fastify type provider, validation, serialization and @fastify/swagger support for zod-openapi. ... npm install zod fastify-zod-openapi ## or yarn add zod fastify-zod-openapi ## or pnpm install zod fastify-zod-openapi
Author samchungy