swagger-api / swagger-api/swagger-ui

Cosmetic: request header description set as placeholder for related textbox

Open
#3,920 5 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cat: style & presentation type: enhancement
Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Don't get distracted by values, please. Pictures = 1000 words:

swagger-json; request params:
image

This is expected (swagger-json > default becomes input.value):
image

But, input.placeholder being set to swagger-json > name + " - " + description seems out of place:
image

Rendered HTML:
image

How about not setting the input.placeholder to anything, if same information is displayed right next to it (name, description). There is nothing new to show, really. Maybe, it could be set to default, so once retyped and then cleared, the user can still see what it was (although it won't be much useful, since browsers remove the placeholder value the moment you start typing).

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 Swagger UI request-parameter textbox rendering and inspect how the input placeholder is derived from the parameter name and description. The change is done when the related textbox no longer receives that duplicated placeholder, while the documented default value behavior remains unchanged; verify the rendered request-parameter UI.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.