swagger-api/swagger-ui
View on GitHubXML hints in the Model view show "OrderedMap"
Open
#3,954 opened on Nov 28, 2017
Good first issueP2type: bugversion: 3.x
Repository metrics
- Stars
- (25,447 stars)
- PR merge metrics
- (Avg merge 18h) (11 merged PRs in 30d)
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.