Andrea Ligios
Andrea Ligios

Reputation: 50203

Can I enable the request duration in Swagger UI 2.x with a Docker variable (or in alternative ways)?

I know there are different ways to enable the HTTP request duration in Swagger UI 3.x:

Swagger UI accepts configuration parameters in four locations.

From lowest to highest precedence:

  • The swagger-config.yaml in the project root directory, if it exists, is baked into the application
  • configuration object passed as an argument to Swagger UI (SwaggerUI({ ... }))
  • configuration document fetched from a specified configUrl
  • configuration items passed as key/value pairs in the URL query string

For example with a Docker variable:

DISPLAY_REQUEST_DURATION="true"

I've some API stuck with the older Swagger UI 2.x, though.

Upvotes: 1

Views: 665

Answers (1)

Helen
Helen

Reputation: 97697

Request duration is only available in Swagger UI 3.0.18+, it's not available in v. 2.x

Upvotes: 2

Related Questions