
Hi, Devs!
That's really important a documentation and good patterns of our API, it shows in cleanable way what is available.
There are ...
For further actions, you may consider blocking this person and/or reporting abuse
Hi Luiz, how are you? ... to export more endpoints i just need put it inside of array right?
i mean like:
const endpointsFiles = [
'./routes/productsRouter.js',
'./routes/salesRouter.js',
];
Certainly, Diogo! Just include all routes into endpointFiles like you wrote.
Your example is exactly what is writing on documentation: github.com/davibaltar/swagger-auto...
const outputFile = './path/swagger-output.json';
const endpointsFiles = ['./path/endpointsUser.js', './path/endpointsBook.js'];
/* NOTE: if you use the express Router, you must pass in the
'endpointsFiles' only the root file where the route starts,
such as index.js, app.js, routes.js, ... */
swaggerAutogen(outputFile, endpointsFiles);
This post helped me, thank you Calaça!
it's a lot of Pequi in the veins!
Hahaha
Thanks for sharing!
Just pointing out if you have somehow swagger.js file in src directory and got routes in src directory as well
routes/yourRouteName.js
won't work got to addsrc/routes/yourRouteName.js
is it possible to add request tags ?
I'm sorry, what?!
npm uninstall and