swagger-api / swagger-api/swagger-ui
how to display a list of exemples from swagger ui for application/x-www-form-urlencoded
Open
Nobody has claimed this yet.
P3
pull-request-welcome
type: bug
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Q&A (please complete the following information)
- OS: Linux
- Browser: Firefox
- Version: 127.0.2
- Method of installation: [e.g. npm, dist assets]
- Swagger-UI version: [e.g. 3.10.0]
- Swagger/OpenAPI version: [e.g. Swagger 2.0, OpenAPI 3.0]
Content & configuration
I am using the new online swagger editor https://editor-next.swagger.io/
Swagger/OpenAPI definition:
openapi: 3.0.3
info:
title: Example API
version: 1.0.0
paths:
/example:
post:
summary: Redefine limits
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
required:
- newColdLimit
- newWarmLimit
properties:
newColdLimit:
type: string
description: New Cold limit to redefine
example: "22"
newWarmLimit:
type: string
description: New Warm limit to redefine
example: "40"
examples:
redefineOk:
summary: Successful redefinition
value: newColdLimit=22&newWarmLimit=40
coldLimitNegative:
summary: Redefinition fail because new cold limit is negative
value: newColdLimit=-22&newWarmLimit=40
warmLimitNegative:
summary: Redefinition fail because new warm limit is negative
value: newColdLimit=22&newWarmLimit=-40
warmBelowCold:
summary: Redefinition fail because new warm limit is below cold limit
value: newColdLimit=40&newWarmLimit=22
responses:
'200':
description: Successful operation
'400':
description: Invalid input
Swagger-UI configuration options:
SwaggerUI({
// your config options here
})
?yourQueryStringConfig
Screenshots
How can we help?
How can I display a list of examples when trying the request under swagger ui ?
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 loading the supplied OpenAPI 3.0.3 definition in https://editor-next.swagger.io/ and inspect how the application/x-www-form-urlencoded request body examples are rendered in Swagger UI. The payload names no repository file or test; done means the request UI presents the listed examples and lets users distinguish or select them as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, openapi
- Domain
- documentation, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100