fastify-zod-openapi

Fastify plugin for zod-openapi

MIT License

Downloads
25.1K
Stars
53
fastify-zod-openapi - v2.0.0

Published by samchungy about 1 month ago

What's Changed

Breaking Changes 🛠

  • 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.

New Contributors

Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v1.3.0...v2.0.0

fastify-zod-openapi - v1.3.0

Published by samchungy about 2 months ago

What's Changed

  • Fix types to work with @fastify/swagger 8.15.0
  • Fix types for compatibility with node16 and bundler tsconfig options

Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v1.2.1...v1.3.0

fastify-zod-openapi - v1.2.1 Latest Release

Published by samchungy 5 months ago

What's Changed

Other Changes

Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v1.2.0...v1.2.1

fastify-zod-openapi - v1.2.0

Published by samchungy 8 months ago

What's Changed

New Features 🎉

  • 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

fastify-zod-openapi - v1.1.0

Published by samchungy 8 months ago

What's Changed

New Features 🎉

Other Changes

Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v1.0.2...v1.1.0

fastify-zod-openapi - v1.0.2

Published by samchungy over 1 year ago

What's Changed

Other Changes

Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v1.0.1...v1.0.2

fastify-zod-openapi - v1.0.1

Published by samchungy over 1 year ago

What's Changed

Other Changes

New Contributors

Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v1.0.0...v1.0.1

fastify-zod-openapi - v1.0.0

Published by samchungy over 1 year ago

What's Changed

Breaking Changes 🛠

New Contributors

Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v0.1.1...v1.0.0

fastify-zod-openapi - v0.1.1

Published by samchungy over 1 year ago

What's Changed

  • Publish with provenance

New Contributors

Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v0.1.0...v0.1.1

fastify-zod-openapi - v0.1.1-beta.3

Published by samchungy over 1 year ago

Attempt to publish with provenance attempt 3

New Contributors

Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v0.1.0...v0.1.1-beta.3

fastify-zod-openapi - v0.1.1-beta.2

Published by samchungy over 1 year ago

Attempt to release with provenance attempt 2

New Contributors

Full Changelog: https://github.com/samchungy/fastify-zod-openapi/compare/v0.1.0...v0.1.1-beta.2

fastify-zod-openapi - v0.1.1-beta.1

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

fastify-zod-openapi - v0.1.0

Published by samchungy over 1 year ago

What's Changed

  • 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