bug-hunters / oas3-tools

A Node.js and browser module that provides tooling around Swagger.
MIT License
27 stars 50 forks source link

Body-parser deprecated #39

Open linqFR opened 3 years ago

linqFR commented 3 years ago

Console shows deprecation of body-parser: body-parser deprecated undefined extended: provide extended option node_modules\oas3-tools\dist\middleware\express.app.config.js:22:33

Why to use both body-parser and express parsers? https://github.com/bug-hunters/oas3-tools/blob/934949027e235c3b00d4e78d7019d1967158b857/src/middleware/express.app.config.ts#L30-L32

and then again https://github.com/bug-hunters/oas3-tools/blob/934949027e235c3b00d4e78d7019d1967158b857/src/middleware/express.app.config.ts#L35-L36

Express can do the job on his own: https://expressjs.com/fr/api.html#express.urlencoded https://expressjs.com/fr/api.html#express.json https://expressjs.com/fr/api.html#express.text

vihuvac commented 3 years ago

I'm creating a POC in order to start using this module and I found this small issue as well, I'd be great to have a document in order to proceed to a leave a PR. I think this module is awesome!