🦋 express-openapi-validator
An OpenApi validator for ExpressJS that automatically validates API requests and responses using an OpenAPI 3 specification.
🦋express-openapi-validator is an unopinionated library that integrates with new and existing API applications. express-openapi-validator lets you write code the way you want; it does not impose any coding convention or project layout. Simply, install the validator onto your express app, point it to your OpenAPI 3.0.x or 3.1.x specification, then define and implement routes the way you prefer. See an example.
Features:
- ✔️ request validation
- ✔️ response validation (json only)
- 👮 security validation / custom security functions
- 👽 3rd party / custom formats / custom data serialization-deserialization
- 🧵 optionally auto-map OpenAPI endpoints to Express handler functions
- ✂️ \$ref support; split specs over multiple files
- 🎈 file upload
- ✏️ OpenAPI 3.0.x and 3.1.x spec support
Docs:
Noteworthy:
- NestJS Koa and Fastify now available! 🚀
- OAS 3.1 (beta) is available in
>=v5.4.0
!
Support the project: