[JAXRS-CXF] [issue #4386] add builder-style methods to model classes#4468
[JAXRS-CXF] [issue #4386] add builder-style methods to model classes#4468wing328 merged 2 commits intoswagger-api:masterfrom
Conversation
|
@wing328, I'm not really sure why the checks failed. Can you help me understand? |
|
@MatanRubin the CI failure with Appveyor can be ignore. Other CI test results look good after I restarted the jobs. |
|
@wing328, ok, cool. Thanks for the update. |
|
Hi @wing328, is there anything else I need to do for this one to be merged in? |
|
@MatanRubin I don't think so. I will perform another set of tests after the AU Open Final. Last time I encountered some issues testing the change but probably due to issues with my machine. |
…el classes
before this change, model classes had only a default constructor and
setter methods, resulting in code like this:
myModel = MyModel();
myModel.setFirstField(firstField);
myModel.setSecondField(secondField);
return myModel;
this change adds builder style methods, such that the above code can be
written more compactly:
return MyModel().firstField(firstField).secondField(secondField);
this is consistent with other JAVA generators in swagger-codegen.
66fd9ab to
6922118
Compare
|
@MatanRubin thanks for doing another push to resolve the CI failure. I'm performing some tests right now... |
|
@MatanRubin thanks for the PR, which has been merged into master. If there's one minor enhancement I can suggest, it would be adding a doc string to the builder-style methods so that the help text will be displayed in the IDE. |
…el classes (swagger-api#4468) * [JAXRS-CXF] [issue swagger-api#4386] add builder-style methods to model classes before this change, model classes had only a default constructor and setter methods, resulting in code like this: myModel = MyModel(); myModel.setFirstField(firstField); myModel.setSecondField(secondField); return myModel; this change adds builder style methods, such that the above code can be written more compactly: return MyModel().firstField(firstField).secondField(secondField); this is consistent with other JAVA generators in swagger-codegen. * update jaxrs-cxf sample code
Before this change, model classes had only a default constructor and setter methods, resulting in code like this:
this change adds builder style methods, such that the above code can be written more compactly:
this is consistent with other JAVA generators in swagger-codegen.