swagger-api / swagger-api/swagger-ui
Display example values for form fields
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Hi, I'd like to request a way to display example values of form fields, i.e. multipart-form or x-www-form-urlencoded requests.
Currently, when I define an example value for a form field, it is not displayed by default. Only when I click "Try it out".
Definition:

Default view:

Try it out view:

For better readability and scannability, it would be useful to always display examples, maybe in a similar way that it's done for headers.

Thanks!
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 default and "Try it out" views for multipart/form-data and application/x-www-form-urlencoded fields using the example shown in the issue. Trace how form-field examples are rendered compared with headers. Done means example values are visible before interaction while the existing "Try it out" behavior remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, openapi
- Domain
- documentation, frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100