oas3-tools-cors
TypeScript icon, indicating that this package has built-in type declarations

2.3.5 • Public • Published

This is a forked project from https://github.com/bug-hunters/oas3-tools with support for cors parameter and additional middleware

oas3-tools-cors project solves the generated code package for oas3-tools v2.2.3 not allowing cors configuration and addition of custom middleware

usage example:

const options = {
    routing: {
        controllers: path.join(__dirname, './controllers'),
    },
    cors: cors(),
    middleware: [
        auth(), helmet()    
    ]
};

const expressAppConfig = oas3Tools.expressAppConfig(path.join(__dirname, './api/openapi.yaml'), options);

const app = expressAppConfig.getApp();

Package Sidebar

Install

npm i oas3-tools-cors

Weekly Downloads

3

Version

2.3.5

License

MIT

Unpacked Size

5.33 MB

Total Files

40

Last publish

Collaborators

  • avikap