I’m using https://github.com/mulesoft-labs/raml-for-jax-rs/blob/master/raml-to-jaxrs/raml-to-jaxrs-gradle-plugin/README.md to generate JAXB objects for my RAML API and while Atomic objects are generated nicely, I am running into issues with array collections. My array types are not generating JAXB models, instead they are referenced as List in the Atomic JAXB models that are created.
Below is the User.raml that creats User.java/UserImpl.java
#%RAML 1.0 DataType displayName: User description: User Details type: object properties: emails: description: User Email List type: !include Emails.raml example: !include ../examples/User.raml
#%RAML 1.0 NamedExample createdDate: 2002-10-02T10:00:00-05:00 sourceIdentifierValue: User emails: - emailType: Primary Email email: email@example.com - emailType: Secondary Email email: firstname.lastname@example.org
#%RAML 1.0 DataType displayName: Emails description: User Email List type: array items: type: object properties: emailType: type: string description : User Email Type email: type: string description: User Email
My generated UserImpl.java contains the following:
@XmlElement( name = "emails", namespace = "##default" ) private List<Object> emails;
Thoughts on what is needed to generate an Email JAXB object and instead use that in UserImpl.java? Thanks in advance.