Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Body-parser deprecated #39

Open
linqFR opened this issue Apr 3, 2021 · 1 comment
Open

Body-parser deprecated #39

linqFR opened this issue Apr 3, 2021 · 1 comment

Comments

@linqFR
Copy link

linqFR commented Apr 3, 2021

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?

this.app.use(bodyParser.urlencoded());
this.app.use(bodyParser.text());
this.app.use(bodyParser.json());

and then again

this.app.use(express.json());
this.app.use(express.urlencoded({ extended: false }));

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
Copy link

vihuvac commented Sep 19, 2021

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants