If your API definition is in Swagger 2.0 format, then you should use Swagger Express Middleware v2. You can install version 2 using npm:
npm install swagger-express-middleware@2
Swagger Express Middleware v3 will support OpenAPI 3.0, but it is still a work in progress. This branch is the latest code for what will eventually be version 3.
You can install the alpha of version 3.0.0 using npm:
npm install swagger-express-middleware@next
Please note that the alpha version is not yet supported, is missing some functionality, definitely contains some bugs, and may have breaking changes at any time until the final release of v3.0.0.
There is no documentation for version 3 yet. Our goal is to keep things as close as possible to version 2, to simplify the migration path. Here are the docs for version 2:
- Mock middleware
- Metadata middleware
- Parse Request middleware
- Validate Request middleware
- CORS middleware
- Files middleware