swagger-api / swagger-api/swagger-codegen

Concatenated enum values in generated html2 documentation

Open
#9,516 1 comment 0 reactions 0 assignees View on GitHub

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 

docs.json.zip

Swagger-UI configuration options:

SwaggerUI({
  // None
})
?yourQueryStringConfig
Screenshots

Issue1

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.