swagger-api / swagger-api/swagger-ui

Add an option to bypass the "try it out" button

Open
#8,324 1 comment 2 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

In swagger openapi v2 UI we could use the API right away - open the route and execute. In this version there is one more click which you have to do all the time.
So now we have to do three clicks to execute a route function:

  1. Expand the route
  2. Click Try it out
  3. Click Execute

I'd understand this change if you'd expand all routes by default, but then you don't allow to enter the parameters when "try it out" is not enabled. But you still display those parameters, then why not hide them and not disable them? This brings frustration.

What is the reasoning behind this UI that's harder to use?
I understand that sometimes you want to browse but then you'd probably want to disable the interaction altogether for the whole swagger UI and not have it under a button under each route. So you could move this button to the top of the page for all routes. So one "try it out" click for all of them would probably be better here.

And now we have this weird compromise where we can't click Execute for specific routes immediately but we can't disable specific routes too.
If you wanted this configurability then you should've added it and not added a button that guards against something that can't be configured.

Again - I'm not sure what was the original idea but the result is not something useful.
I think if you want to enable editing then you should at least move this button to the top of the UI because there is no difference if I press it at the top or for each route separately.
And on top of that if you collapse and expand a route group then the Try it Out button becomes disabled. This is not good.

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 reproducing the Try it Out flow in Swagger UI with an OpenAPI v2 definition, then inspect the existing route interaction behavior. The issue does not name files or tests; done would require an agreed option for bypassing or relocating Try it Out while preserving route parameter editing and execution.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.