swagger-api / swagger-api/swagger-ui
Cosmetic: request header description set as placeholder for related textbox
Nobody has claimed this yet.
- 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:

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

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

Rendered HTML:

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
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 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