phoenixnap / springmvc-raml-plugin

Spring MVC - RAML Spec Synchroniser Plugin. A Maven plugin designed to Generate Server & Client code in Spring from a RAML API descriptor and conversely, a RAML API document from the SpringMVC Server implementation.
Apache License 2.0
136 stars 84 forks source link

Could generate builder in Types? #221

Closed jjmena closed 6 years ago

jjmena commented 6 years ago

When we define a Type with PojoBuilder, it could allow to generate builder methods (starting with "with" for instance like JAXB generator) to chain the way to fill the fields of an object.

It could generate methods like this:

  /**
     * With the currency.
     * 
     * @param currency
     *     the new currency
     */
    public MyType withCurrency(String currency) {
        this.currency = currency;
        return this;
    }

And could be enabled via this configuration:

<generateBuilders>true</generateBuilders>