swagger-api / swagger-api/swagger-ui

Request duration is not showing when API respond with 400 status code

Open
#6,618 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Q&A
  • OS: Windows 10 Pro
  • Browser: chrome
  • Version: 83.0.4103.97 (Official Build) (64-bit)
  • Method of installation: npm
  • Swagger-UI Express: ^4.1.4
  • Swagger-UI version: 3.18.3
  • Swagger/OpenAPI version: 3.0.1
Content & configuration

I have an issue related request duration parameter displayRequestDuration: true, its showing request duration perfectly when API respond with 200 status code but if API respond with other status code like 400, 409 its not showing Request duration.

Status Code 200

image

Status Code 400

image

swagger-ui-express response:

Issue-199:
This issue is specific to swagger-ui (https://github.com/swagger-api/swagger-ui). Please raise them with swagger-ui directly.
This module is a wrapper for swagger-ui for express.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or entry point is named. Reproduce the behavior in Swagger UI with displayRequestDuration: true for both successful and 400 responses, then trace the response-display path; done means the request duration is shown for non-2xx responses as well.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.