Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(readme): add plugin compatibility table #743

Merged
merged 1 commit into from
Jul 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@

A Fastify plugin for serving [Swagger (OpenAPI v2)](https://swagger.io/specification/v2/) or [OpenAPI v3](https://swagger.io/specification) schemas, which are automatically generated from your route schemas, or from an existing Swagger/OpenAPI schema.

Supports Fastify versions `4.x`.

- Please refer to [6.x](https://github.com/fastify/fastify-swagger/tree/6.x) for Fastify `^3.x` compatibility.
- Please refer to [3.x](https://github.com/fastify/fastify-swagger/tree/2.x) for Fastify `^2.x` compatibility.
- Please refer to [1.x](https://github.com/fastify/fastify-swagger/tree/1.x) for Fastify `^1.x` compatibility.

If you are looking for a plugin to generate routes from an existing OpenAPI schema, check out [fastify-openapi-glue](https://github.com/seriousme/fastify-openapi-glue).

Following plugins serve swagger/openapi front-ends based on the swagger definitions generated by this plugin:
Expand All @@ -26,6 +20,22 @@ See also [the migration guide](MIGRATION.md) for migrating from `@fastify/swagge
npm i @fastify/swagger
```

### Compatibility

| Plugin version | Fastify version |
| -------------- |---------------- |
| `^7.0.0` | `^4.0.0` |
| `^6.0.0` | `^3.0.0` |
| `^3.0.0` | `^2.0.0` |
| `^1.0.0` | `^1.0.0` |


Please note that if a Fastify version is out of support, then so are the corresponding version(s) of this plugin
in the table above.
See [Fastify's LTS policy](https://github.com/fastify/fastify/blob/main/docs/Reference/LTS.md) for more details.



<a name="usage"></a>
## Usage
Add it to your project with `register`, pass it some options, call the `swagger` API, and you are done!
Expand Down