Skip to content
F

Fastify Swagger

Swagger documentation generator for Fastify

by fastifyFree

#1732in Utilities
0In stores

Description

@fastify/swagger is a Fastify plugin that serves Swagger (OpenAPI v2) or OpenAPI v3 documentation for your API. In its default dynamic mode,…

Highlights

  • OpenAPI v3 or Swagger v2 docs from routes
  • Dynamic and static registration modes
  • Works with @fastify/autoload
  • Pairs with Swagger UI and Scalar viewers
  • Migration guide from version 8.x

Ratings & Reviews

No ratings yet

Be the first to rate Fastify Swagger.

People also visit

A

agent-docs-api-openapi

Agent skill for docs-api-openapi - invoke with $agent-docs-api-openapi

AI Skills
Get
S

Swagger Inspector Extension

This extension allows the Swagger Inspector to bypass CORS

Utilities
Launch
O

openapi-spec-generation

Generates OpenAPI 3.1 specs from code

AI Skills
Get
L

Laravel Openapi

Generate OpenAPI specification for Laravel Applications

Developer Tools
Launch
K

kadykov/mcp-openapi-schema-explorer

Token-efficient access to OpenAPI/Swagger specs via MCP Resources

AI Skills
Get
F

fastify-best-practices

Guides development of Fastify Node.js backend servers and REST APIs

AI Skills
Get

Fastify Swagger FAQ

What is @fastify/swagger?

A Fastify plugin that generates and serves Swagger or OpenAPI documentation for your routes.

Which Fastify version do I need?

The README's compatibility table lists the pairs. Plugin version 9.x and later works with Fastify 5.x.

Does the order of registration matter?

Yes. Register @fastify/swagger before your routes, or they will not appear in the generated documentation.

Can it generate OpenAPI 3?

Yes. Provide the openapi option to get OpenAPI-compliant output. The default version is 3.0.3, and 3.1.0 or 3.2.0 can be set.

Which viewers can display the docs?

The README lists @fastify/swagger-ui and @scalar/fastify-api-reference as plugins that serve front-ends for the generated definitions.

What are the best Fastify Swagger alternatives?

Popular alternatives to Fastify Swagger include Swagger Inspector Extension, Graphql Docs and GraphQL-Markdown. See all Fastify Swagger alternatives

Developer Stuff

Badges