Class is created with name Json[0-9]{9}

  - pagedResult:
               schema:  |
                    {  "$schema": "",
                        "type": "object",
                        "description": "A collection of <<resourcePathName>>",
                        "properties": {
                        "total_items":  { "type": "integer", "required": true },
                        "start_index":  { "type": "integer", "required": true },
                        "end_index":    { "type": "integer", "required": true },

                         "<<resourcePathName>>":  {
                            "type": "array",
                            "items": { "$ref": "<<resourcePathName| !singularize>>"}


This seems to work with the exception of the pagedResult having a strange name. Pulling it out seems to cause issues with Jsonschematopojo.

Is there a way to use to provide the name for the class?


Can you elaborate a little bit more on what you try to achieve. As far as I see - this is working inside the designer and the console gives the correct output as well.


The issue I am having is that the resource type is generated with a dynamic file name in the model. Something like Json1834346158 I am looking if there is a way to specify a class name using the <>.


AH - are you talking about some stub generator tool?


yeah, jsontopojo, or at least the implementation that comes with the RAMLjavaparser.


I think the parser are not really implementing that logic. Could you please raise an issue on the appropriate github repo to let the developers know you’ve got a problem?


Just in case anyone else run into this issue, I wanted to report back with the solution we found. jsonschema2pojo will do weird things with class naming when implementing resources with context driven names.

You can specify the class name by including the following in the jsonschema:

"javaType" : "<<resourcePathName|!capitalize>>Collection"

or something along those lines.


That’s interesting - thanks for sharing @lenois