eov-esmresolver

1.0.2 • Public • Published

EOV-esmresolver

A resolver for https://github.com/cdimascio/express-openapi-validator which allows for ESM imports.

Install

yarn add eov-esmresolver

or

npm install eov-esmresolver

Example

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)
    })
)

Full example

Readme

Keywords

none

Package Sidebar

Install

npm i eov-esmresolver

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

2.76 kB

Total Files

3

Last publish

Collaborators

  • andyvanee