swagger-api / swagger-api/swagger-ui
Form-data request body fields' check boxes are shifted to the center of the form
Nobody has claimed this yet.
- 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: Windows
- Browser: Chrome
- Version: 115.0.5790.171
- Method of installation: .NET nuget Swashbuckle.AspNetCore 6.5.0
- Swagger-UI version: 4.15.5
Describe the bug you're encountering
Form-data request body fields' 'Send empty value' checkboxes are shifted to the center of the form.
The reason is in css style (swagger-ui.css) of '.swagger-editor .swagger-ui .parameter__empty_value_toggle input' class which does not contain 'width:auto'. It is possible to fix via custom styles, but it is working properly on editor.swagger.io, so I want to know how to fix it without any of such 'workarounds'.
To reproduce...
Steps to reproduce the behavior:
- Create a POST method with form-data input;
- Observe the checkbox 'Send empty value' shift.
Expected behavior
I have tried it on editor.swagger.io and 'Send empty value' is not shifted. The css style of '.swagger-editor .swagger-ui .parameter__empty_value_toggle input' class contains 'width:auto'.
Screenshots
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 in swagger-ui.css at the .swagger-editor .swagger-ui .parameter__empty_value_toggle input rule, which the report identifies as missing width:auto. Reproduce a POST form-data request with an empty-value checkbox in Chrome, then verify the checkbox aligns like the one on editor.swagger.io.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100