{"repo":"fastify/fastify-swagger","free":true,"listed":false,"github":"https://github.com/fastify/fastify-swagger","clone":"git clone https://github.com/fastify/fastify-swagger.git","description":"Swagger documentation generator for Fastify","language":"JavaScript","stars":1092,"topics":["fastify","swagger","documentation","fastify-plugin"],"license":"MIT","category":"docs-static-sites","readme_excerpt":"@fastify/swagger A Fastify plugin for serving Swagger (OpenAPI v2) or OpenAPI v3 schemas, which are automatically generated from your route schemas, or an existing Swagger/OpenAPI schema. If you are looking for a plugin to generate routes from an existing OpenAPI schema, check out fastify-openapi-glue. The following plugins serve Swagger/OpenAPI front-ends based on the swagger definitions generated by this plugin: - @fastify/swagger-ui - @scalar/fastify-api-reference See the migration guide for migrating from @fastify/swagger version =8.x . Install Compatibility Plugin version Fastify version -------------- --------------- =9.x ^5.x =7.x =3.x =1.x Usage Add it with register , pass it options, call the swagger API, and you are done! Below is an example of configuring the OpenAPI v3 specification with Fastify Swagger: ℹ️ Note: @fastify/swagger must be registered before any routes to ensure proper route discovery. Routes registered before this plugin will not appear in the generated documentation. With @fastify/autoload Register @fastify/swagger before routes are loaded with @fastify/autoload : API Register options Modes @fastify/swagger supports dynamic and static registration modes: Dynamic dynamic is the default mode, which auto-generates API schemas from route schemas: All properties in the Swagger (OpenAPI v2) and OpenAPI v3 specifications can be used. @fastify/swagger generates API schemas adhering to the Swagger specification by default. Providing an openapi option genera","default_branch":null,"files":null,"tree":[],"storefront":"/r/fastify","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/fastify/fastify-swagger/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}