Skip to content
This repository was archived by the owner on Apr 27, 2021. It is now read-only.

Commit d57d2ac

Browse files
committed
Made setters chainable
1 parent 588de22 commit d57d2ac

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/org/javawebstack/openapi/client/JavaClientGenerator.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,9 @@ private void generateSchema(StringBuilder sb, String intendation, String name, O
394394
types.forEach((pName, pType) -> {
395395
sb
396396
.append(intendation)
397-
.append(" public void set")
397+
.append(" public ")
398+
.append(name)
399+
.append(" set")
398400
.append(capitalize(pName))
399401
.append("(")
400402
.append(pType)
@@ -408,6 +410,8 @@ private void generateSchema(StringBuilder sb, String intendation, String name, O
408410
.append(pName)
409411
.append(";\n")
410412
.append(intendation)
413+
.append(" return this;\n")
414+
.append(intendation)
411415
.append(" }\n\n")
412416
.append(intendation)
413417
.append(" public ")

0 commit comments

Comments
 (0)