swagger-api / swagger-api/swagger-ui

Add configurable Timeout setting to UI at instantiation

Open
#3,659 1 comment 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cat: try-it-out type: feature
Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Looking for a way to increase the timeout setting on Swagger UI due to having a very under powered dev instance and came across this: https://github.com/springfox/springfox/issues/1523

I've used the solution and it works if you edit index.html and add it the line below immediately after the supportedSubmitMethods line:

timeout: 60000,

Just a note in case if helps someone after and a suggestion to add the setting into the build, I believe the default is at 30000ms just now.

I was using Swagger-PHP version 2.0.11 and Swagger UI v2.2.10 and havent checked if it is now included in later versions

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

Start by locating the generated index.html and the supportedSubmitMethods setting mentioned in the report, then trace how Swagger UI is instantiated and configured. The change is complete when timeout can be configured at instantiation instead of editing index.html, with the existing default preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
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.