swagger-api / swagger-api/swagger-ui
Input text box with String value is unresponsive while using string with space or new line in swagger
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
In my project i need to fetch the String value from input text box.
Input text box becomes unresponsive and it doesn't allow the String value with space or new line. When I enter the space in the input text box , this came up with default value as {} and not able to remove these braces {} .
| Q | A |
|---|---|
| Bug or feature request? | Bug |
| Which Swagger/OpenAPI version? | 1.5.16 |
| Which Swagger-UI version? | 3.3.1 |
| How did you install Swagger-UI? | Cloned the swaggerUI repository |
| Which browser & version? | Chrome - 61.0.3163.100 |
| Which operating system? | Windows 10 |
Demonstration API definition
Our code is client specific .So i cant share the demo example
Configuration (browser query string, constructor, config.yaml)
We are using swagger.json which is generated at run time
Configuration for message body in swagger.json is show below

Expected Behavior
swagger message box should allow space and new line

Current Behavior
When we are using space in the message box , the {} are filled in the message box

Possible Solution
--
Context
We addressed this issue while testing values with space in the message box.Searched in google and found the same kind of issue has been reported already https://github.com/swagger-api/swagger-ui/issues/3271 .But this is not yet resolved
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 issue in Swagger UI 3.3.1 with the provided swagger.json message-body configuration, focusing on input containing spaces or newlines. Done means the message box remains responsive and preserves editable text without inserting or trapping {}.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100