You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// regular apiawaitinitRoutes('./routes','/api-docs',['/','/auth','/clinic', ...
]);// doctor apiawaitinitRoutes('./doctorRoutes','/api-docs-doctor',['/doctor']);
The second call runs 'finish' event twice for the first group of routes and for the second. This happens since swaggerEvents.js does not create the second instance if instance has been already created:
constswaggerEvents=()=>{if(api)returnapi;// <-- this line
...
Expected behavior
A new instance should be created.
The text was updated successfully, but these errors were encountered:
Describe the bug
The second call to
expressJSDocSwagger(app)
returns the same instance as the first call.To Reproduce
I wrote the following code to create api:
And I call it this way:
The second call runs 'finish' event twice for the first group of routes and for the second. This happens since
swaggerEvents.js
does not create the second instance if instance has been already created:Expected behavior
A new instance should be created.
The text was updated successfully, but these errors were encountered: