https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/
I want to output the request duration and based on the available configurations, the displayRequestDuration
is by default false so on my express app, I have added it in the options object but it does not seem to be working
Is there any examples of how to correctly configure this parameter?
This answer is only for the use of swagger-jsdoc
and swagger-ui-express
packages.
The displayRequestDuration
can be defined in the swaggerUI.setup()
function. For example
app.use("/swagger", swaggerUI.serve, swaggerUI.setup(swaggerDocs, { swaggerOptions:{ displayRequestDuration: true } }));