1.0.2 • Published 5 years ago
eov-esmresolver v1.0.2
EOV-esmresolver
A resolver for https://github.com/cdimascio/express-openapi-validator which allows for ESM imports.
Install
yarn add eov-esmresolveror
npm install eov-esmresolverExample
Follow setup example for passing the operationHandlers parameter
https://github.com/cdimascio/express-openapi-validator/blob/master/examples/3-eov-operations/app.js
and replace the handler with the following:
import esmresolver from "eov-esmresolver"
app.use(
OpenApiValidator.middleware({
apiSpec,
validateResponses: true,
operationHandlers: esmresolver(modulePath)
})
)