raml-for-jax-rs
raml-for-jax-rs copied to clipboard
Support for Jackson2 Annotation - JsonInclude.Include.NON_EMPTY
Hi,
When we generate the jax-rs source files from raml specs using raml-to-jax-rs.jar, it annotates the model classes with @JsonInclude(JsonInclude.Include.NON_NULL), when we use jackson2 as the serializer.
How can we tell raml-to-jax-rs generator to annotate the model classes with @JsonInclude(JsonInclude.Include.NON_EMPTY) instead? Adding to this, how can we ask this generator to add additional Jackson annotations or even custom annotations to the generated model classes?
You may want to know that our application is very old and we are still using ANT as our build framework (we will be migrating to maven or gradle soon) and hence, we are using the command line approach to generate the classes.
For your reference, below is the command we are using to generate the classes -
java -cp raml-to-jax-rs.jar org.raml.jaxrs.codegen.core.Launcher -basePackageName package_name -outputDirectory directory_name -sourceDirectory directory_name -jaxrsVersion 2.0 -jsonMapper jackson2
Hi there,
We meet same problem,do you have solution now?