You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems the generation of POJOs using the array type is broken.
POJOs get properly generated, but the collection container class (Set/List) is not imported.
Compiling this with rule Spring4ControllerDecoratorRule results in
Compilation failure:
[ERROR] /.../target/generated-raml-mvc/io/ramltest/rest/model/MyPojo.java:[13,13] cannot find symbol
[ERROR] symbol: class List
[ERROR] location: class io.ramltest.rest.model.MyPojo
[ERROR] .../target/generated-raml-mvc/io/ramltest/rest/model/MyPojo.java:[27,19] cannot find symbol
[ERROR] symbol: class List
[ERROR] location: class io.ramltest.rest.model.MyPojo
[ERROR] /.../target/generated-raml-mvc/io/ramltest/rest/model/MyPojo.java:[57,12] cannot find symbol
[ERROR] symbol: class List
[ERROR] location: class io.ramltest.rest.model.MyPojo
[ERROR] /.../target/generated-raml-mvc/io/ramltest/rest/model/MyPojo.java:[67,35] cannot find symbol
[ERROR] symbol: class List
[ERROR] location: class io.ramltest.rest.model.MyPojo
The generated POJO:
package io.ramltest.rest.model;
import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
public class MyPojo implements Serializable
{
final static Long serialVersionUID = -8105318197825619638L;
private List<KeyValue> aKeyValueArray;
/**
* Creates a new MyPojo.
*
*/
public MyPojo() {
super();
}
/**
* Creates a new MyPojo.
*
*/
public MyPojo(List<KeyValue> aKeyValueArray) {
super();
this.aKeyValueArray = aKeyValueArray;
}
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof MyPojo) == false) {
return false;
}
MyPojo otherObject = ((MyPojo) other);
return new EqualsBuilder().isEquals();
}
public int hashCode() {
return new HashCodeBuilder().toHashCode();
}
/**
* Returns the aKeyValueArray.
*
* @return
* aKeyValueArray
*/
public List<KeyValue> getAKeyValueArray() {
return aKeyValueArray;
}
/**
* Set the aKeyValueArray.
*
* @param aKeyValueArray
* the new aKeyValueArray
*/
public void setAKeyValueArray(List<KeyValue> aKeyValueArray) {
this.aKeyValueArray = aKeyValueArray;
}
}
Using 0.10.0 on branch master.
The text was updated successfully, but these errors were encountered:
It seems the generation of POJOs using the array type is broken.
POJOs get properly generated, but the collection container class (Set/List) is not imported.
RAML file:
Compiling this with rule
Spring4ControllerDecoratorRule
results inThe generated POJO:
Using 0.10.0 on branch master.
The text was updated successfully, but these errors were encountered: