swagger-api / swagger-api/swagger-codegen
Concatenated enum values in generated html2 documentation
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Q&A (please complete the following information)
- OS: OSX
- Browser: chrome
- Version: 22
- Method of installation: Run from Swagger Editor
- Swagger-UI version: 3.10.0
- Swagger/OpenAPI version: Swagger 2.0, OpenAPI 3.0
Content & configuration
File -> Import File (JSON File attached)
Edit -> Convert to OpenAPI 3
Generate Client -> html2
Swagger/OpenAPI definition:
# See attached JSON file
Swagger-UI configuration options:
SwaggerUI({
// None
})
?yourQueryStringConfig
Screenshots

How can we help?
When I generate html2 documentation, my enums concatenate each previous enum definition.
E.g:
Enum1 is ["a","b","c"], displays as "a", "b", "c"
Enum2 is ["A","B","C"], displays as "a", "b", "c", "A", "B", "C"
Enum3 is ["Cat,"Mouse"] displays as "a", "b", "c", "A", "B", "C", "Cat", "Mouse"
As in the screenshot attached
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 with the attached docs.json.zip and reproduce the issue through Swagger Editor by converting the definition to OpenAPI 3 and generating html2 documentation. Inspect the generated output for enum rendering; done means each enum displays only its own values rather than values accumulated from earlier enums.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100