swagger-api / swagger-api/swagger-codegen
swagger-codegen-cli-2.4.21.jar -l html creates empty "examples"
Open
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Swagger-codegen version
Generated correctly with 2.4.20, but no longer with 2.4.21
Swagger declaration file content or url
"examples" : [ {
"contentType" : "application/json",
"example" : "{\"empty\": false}"
} ],
Command line used for generation
-DdebugSupportingFiles -l html
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
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 with swagger-codegen-cli 2.4.21 using -DdebugSupportingFiles -l html, then compare the generated output with version 2.4.20. Trace how the supplied examples entry with contentType and example is handled during HTML generation. Done means the HTML output no longer contains an empty examples section and preserves the provided example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, java
- Domain
- cli, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100