swagger-api / swagger-api/swagger-codegen
OpenAPI 3.0 dynamic HTML codegen crashes browser
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
I ran docker pull swaggerapi/swagger-codegen-cli-v3:3.0.11. Note that the latest generates an error so I pulled the latested tag, which was created 5 days ago. Also, if I use swaggerapi/swagger-codegen-cli, I get a com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'openapi': was expecting ('true', 'false' or 'null')
at [Source: (StringReader); line: 1, column: 8] error
Command:
docker run --rm -w /local -v ${PWD}:/local swaggerapi/swagger-codegen-cli-v3:3.0.11 generate -i openapi.yaml -l dynamic-html
The dynamic HTML was generated, but when I pull up the index.html file in the browser, it crashes the browser. I tried it in both Firefox and Chrome. I'm running Linux Mint 19.1 Tessa.
The regular 'html' option didn't have the same issue.
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 with the provided docker run command and openapi.yaml, then open the generated index.html in Firefox and Chrome. Compare the dynamic-html output with the regular html output and trace the dynamic-html generator entry point. Done means the generated dynamic HTML opens without crashing either browser.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, openapi
- Domain
- documentation, tooling, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100