swagger-api / swagger-api/swagger-codegen
[JAVA] Bug in setter naming
Open
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
AbstractJavaCodegen class generates incorrect setter name for properties
Swagger-codegen version
2.4.21
Suggest a fix/enhancement
Could be simply fixed:
codegenProperty.setter = toSetter(codegenProperty.name);
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 in modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaCodegen.java at line 1053, where the issue reports the setter naming problem. Compare the generated setter name with codegenProperty.name and verify that the resulting Java property setter uses the expected name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100