phiz71 / vertx-swagger

Swagger integration in Eclipse Vert.X world. A dynamic Vert.X router, configured with a swagger file and a swagger-codegen plugin to generate a server stub.
Apache License 2.0
86 stars 35 forks source link

Use fluent setters in Models #64

Closed lopesmcc closed 7 years ago

lopesmcc commented 7 years ago

Just like the generated Java clients, implement fluent setters in all models. Example:

public class Example {

  private String value;

  //(...)

  public String getValue() {
    return this;
  }

  public void setValue() {
    this.value = value;
  }

  // fluent setter
  public Example value(String value) {
    this.value = value;
    return this;
  }

  // (...)
}
phiz71 commented 7 years ago

@lopesmcc : do you mean something like this #66 ?

lopesmcc commented 7 years ago

@phiz71 perfect. Thanks 👍