swagger-api / swagger-api/swagger-ui

Display example values for form fields

Open
#8,087 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: feature
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:

image

Default view:

image

Try it out view:

image

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

image

Thanks!

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.