Raml-to-jaxrs-maven-plugin ignores jsonMapperConfiguration?

I’m using the raml-to-jaxrs-maven-plugin to generate body objects (for Spring REST, not for JAX-RS).

The problem is that it doesn’t matter what I put inside <jsonMapperConfiguration>. The generated *Impl.java classes are always the same.

Am I using the plugin wrong or am I expecting something that the plugin can’t do?

My config:


Show us your RAML?

I just copied the jsonMapperConfiguration block from your post. I pasted it into the pom of versions 3.0.4, 3.0.5 and 3.0.6-SNAPSHOT of simple-json-example.

Running mvn generate-sources worked perfectly in all three versions.

A no-arg constructor, toString(), equals() and hashcode() methods were are generated as expected. The RAML type in simple-json-example doesn’t specify any integer properties. But I don’t doubt that boxed Integers would have been generated if there were such properties defined in the source RAML file.

Thanks for the reply.

The main difference between the example and my raml files is that we are not using schemas, e.g.

The example uses:

        schema: |
           "type": "object",
           "$schema": "http://json-schema.org/draft-03/schema",
           "id": "http://jsonschema.net",
           "required": true,
           "properties": {
             "songTitle": {
               "type": "string",
               "required": true
             "albumId": {
               "type": "string",
               "required": true,
               "minLength": 36,
               "maxLength": 36

But we use:

       type: object
       required: true
               type: string
               required: true
               type: string
               required: true
               minLength: 36
               maxLength: 36

Any idea why this compiles to COMPLETELY DIFFERENT java files?