swagger-api / swagger-api/swagger-ui
XML hints in the Model view show "OrderedMap"
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
| Q | A |
|---|---|
| Bug or feature request? | Bug |
| Which Swagger/OpenAPI version? | 2.0/3.0.0 ( both ) |
| Which Swagger-UI version? | g23fd8a4d (aka 3.5.0) |
| How did you install Swagger-UI? | petstore.swagger.io |
| Which browser & version? | Chrome 60 |
| Which operating system? | Linux |
Demonstration API definition
petstore.swagger.io ( using its default petstore 2.0 )
Expected Behavior
A UI indicating the XML behaviour that isn't a dump of the underlying immutablejs object. See screencap, look for OrderedMap
Current Behavior

Note: xml: OrderedMap { "name": "photoUrl", "wrapped": true }string]
Possible Solution
A: xml: <photoUrl></photoUrl> string]
B: xml: <photoUrl> (wrapped) string]
Context
I noticed the word "OrderedMap" and realized this is a dump of the underlying immutablejs object. Its a fragile solution, affected by changes to the underlying object as well as how future versions of ImmutableJs convert to a string. If not very performant.
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
Reproduce the issue in the Swagger UI Model view using the default petstore.swagger.io definition with Chrome. Start from the XML hint displaying OrderedMap and compare it with the proposed readable formats. Done means the hint shows XML behavior without exposing the underlying ImmutableJS object.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100