swagger-api / swagger-api/swagger-codegen
[JAVA] Javadoc backslash escape issue
Open
Nobody has claimed this yet.
Client: Java
Feature: Documentation
help wanted
Issue: Bug
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
When codegen renders a method description into a Javadoc comment it seems to not correctly remove \"escapes.
Sample
"description":"Test\nRequires user permission: \"system.variables-rest:view\"."
Result:
* Test Requires user permission: \"system.variables-rest:view\".
It does not preserve the linebreaks and it does preserve the \
Swagger-codegen version
2.2.3
Swagger declaration file content or url
"description":"Test\nRequires user permission: \"system.variables-rest:view\"."
Command line used for generation
java -jar ... generate -l java -i swagger.json -o .
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 swagger.json example and run the shown Java generation command to reproduce the generated Javadoc output. Compare the result with the description's expected line breaks and quotation marks; done means escaped quotes render correctly and the newline is preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100