eov-esmresolver
v1.0.2
Published
A resolver for <https://github.com/cdimascio/express-openapi-validator> which allows for ESM imports.
Readme
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)
})
)