swagger-api / swagger-api/swagger-ui
displayRequestDuration is not working as expected
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Q&A (please complete the following information)
- OS: macOS
- Browser: firefox for developers
- Version: 71.0b1 (64-bit)
- Method of installation: npm
- Swagger-UI version: 3.24.0
- Swagger/OpenAPI version: OpenAPI 3.0
Content & configuration
Swagger-UI configuration options:
% cat swagger-config.yaml
---
url: "https://petstore.swagger.io/v2/swagger.json"
dom_id: "#swagger-ui"
validatorUrl: "https://validator.swagger.io/validator"
displayRequestDuration: true
%
Describe the bug you're encountering
after adding displayRequestDuration to swagger-config.yaml as per the above and did the build using 'npm run build', and deployed new swagger-ui files:
The request duration is not showing when I use the try it out feature
To reproduce...
Steps to reproduce the behavior:
- Update file swagger-config.yaml to add "displayRequestDuration: true"
- run "npm run build"
- copy files under list/ directory to your website location
- Open your OAS and use try it out feature then check in the response and you would see that there is no "request duration" box.
Expected behavior
I expect that request duration section appears in try it out feature.
Screenshots
Additional context or thoughts
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with swagger-config.yaml using displayRequestDuration: true, then run npm run build and inspect the generated files under the list/ directory. Use the Try It Out flow against the provided Petstore URL and compare the response view with the expected request duration section. Done means the duration is displayed after a request when the option is enabled.
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