Skip to content

Installation

An OpenApi validator for ExpressJS that automatically validates API requests and responses using an OpenAPI 3 specification.

Install

with npm

npm install express-openapi-validator

with yarn

yarn add express-openapi-validator

OpenAPI 3.1 (support) alpha

Replace with the latest alpha version

npm install express-openapi-validator@6.0.0-alpha.<X>

Upgrading from 3.x

Note

In v4.x.x, the validator is installed as standard connect middleware using app.use(...) and/or router.use(...) (example). This differs from the v3.x.x the installation which required the install method(s). The install methods no longer exist in v4.