swagger-api / swagger-api/swagger-codegen
[JAVA]need `JsonIgnore` on java fluent setter
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Also want a configuration to diable java fluent setter.
Here is my problem:
I have a Schema Object which has a property like settlementNo then the generated class will have two
setter
public ConditionRequest settlementNo(String settlementNo) {
this.settlementNo = settlementNo;
return this;
}
public void setSettlementNo(String settlementNo) {
this.settlementNo = settlementNo
then with the default configuration of spring-fox and spring-boot , in the spring-fox-swagger-ui the ConditionRequest would have two property
settlementNo(the right one)
tlementNo(the wrong one)
And if both of the property has a value, tlementNo's will overwrite settlementNo's
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 locating the Java generator templates that produce fluent setters and compare their output with the conventional setter shown in the issue. The issue is addressed when the generated model no longer exposes the extra property in spring-fox-swagger-ui, or the requested configuration to disable fluent setters is available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100