ID conflict in between "Send empty value" checkboxes
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript
- Domain
- frontend
Research direction
Start by loading the supplied OpenAPI 3.1 definition in Swagger UI and reproducing the two “Send empty value” controls in the form. Search the frontend implementation for that control and inspect how each checkbox and label receives its ID; done means each label toggles only its adjacent checkbox.
Written by the indexing model from the issue text.
Description
Q&A (please complete the following information)
- OS: Linux Debian 13
- Browser: firefox
- Version: Zen 1.19.8b (Firefox 149.0.2)
- Method of installation: npm
- Swagger-UI version: 5.32.6
- Swagger/OpenAPI version: OpenAPI 3.1
Content & configuration
Example Swagger/OpenAPI definition:
openapi: 3.1.0
paths:
/hello:
post:
requestBody:
content:
application/x-www-form-urlencoded:
schema:
properties:
foo:
type: string
bar:
type: string
default: ""
baz:
type: string
default: ""
type: object
required:
- foo
required: true
Swagger-UI configuration options: defaults.
Describe the bug you're encountering
An ID conflict between the checkboxes is causing all their labels to only control one. (see screenshot)
To reproduce...
Steps to reproduce the behavior:
- Load the OpenAPI definition above
- Expand the
/helloendpoint - Click 'Try it out'
- Click on one of the 'Send empty value' labels
- Click on the other label
- See that the same checkbox was toggled
Expected behavior
Each label controls the checkbox it is located next to.
Screenshots
Additional context or thoughts
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
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.
More from swagger-api/swagger-ui
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
swagger-api/swagger-ui#11039 · 2 comments · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
swagger-api/swagger-ui#10976 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
swagger-api/swagger-ui#10957 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
swagger-api/swagger-ui#10853 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
swagger-api/swagger-ui#10825 · 1 reaction ·
All issues in swagger-api/swagger-ui
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·