Fastify plugin for zod-openapi
MIT License
Published by samchungy about 1 month ago
Support Fastify 5 by @dmuharemagic in https://github.com/samchungy/fastify-zod-openapi/pull/155
Bump zod-openapi requirement to 3.0.1 by @samchungy in https://github.com/samchungy/fastify-zod-openapi/pull/156
This release sets the required Node version to 20 and bumps all the underlying peerDependency version requirements to the following:
"@fastify/swagger": "^9.0.0",
"@fastify/swagger-ui": "^5.0.1",
"fastify": "5",
"zod-openapi": "^3.0.1"
The Fastify update required a few type signature changes but there should be hopefully minimal updates you need to apply to your code.
Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v1.3.0...v2.0.0
Published by samchungy about 2 months ago
node16
and bundler
tsconfig optionsFull Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v1.2.1...v1.3.0
Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v1.2.0...v1.2.1
Published by samchungy 8 months ago
Add Fastify Plugin Signatures by @samchungy, @puppo in https://github.com/samchungy/fastify-zod-openapi/pull/99
This allows you to declare your routes with more modularity eg.
const plugin: FastifyPluginAsyncZodOpenApi = async (fastify, _opts) => {
fastify.route({
method: 'POST',
url: '/',
// Define your schema
schema: {
body: z.object({
jobId: z.string().openapi({
description: 'Job ID',
example: '60002023',
}),
}),
response: {
201: z.object({
jobId: z.string().openapi({
description: 'Job ID',
example: '60002023',
}),
}),
},
} satisfies FastifyZodOpenApiSchema,
handler: async (req, res) => {
await res.send({ jobId: req.body.jobId });
},
});
};
app.register(plugin);
Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v1.1.0...v1.2.0
Published by samchungy 8 months ago
Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v1.0.2...v1.1.0
Published by samchungy over 1 year ago
Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v1.0.1...v1.0.2
Published by samchungy over 1 year ago
Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v1.0.0...v1.0.1
Published by samchungy over 1 year ago
Add components support by @samchungy in https://github.com/samchungy/fastify-zod-openapi/pull/9
zod-openapi
2.6.3 is now required. Please check the readme on how to enable this support.
Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v0.1.1...v1.0.0
Published by samchungy over 1 year ago
Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v0.1.0...v0.1.1
Published by samchungy over 1 year ago
Attempt to publish with provenance attempt 3
Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v0.1.0...v0.1.1-beta.3
Published by samchungy over 1 year ago
Attempt to release with provenance attempt 2
Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v0.1.0...v0.1.1-beta.2
Published by samchungy over 1 year ago
Attempt to publish with provenance
Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v0.1.0...v0.1.1-beta.1
Published by samchungy over 1 year ago
Initial Release
Please note: At this time, there is no support for components.
Full Changelog: https://github.com/samchungy/fastify-zod-openapi/commits/v0.1.0