I am trying to generate POJOs from a json schema.
Problem : If I have the class name as "s", it throws an error.
Error from plugin execution: Execution goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.0:generate failed: String index out of range: 0 -> [Help 1]
I have tried using the maven plugin as well as http://www.jsonschema2pojo.org/
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
<version>0.4.0</version>
Both give errors while generating the pojos.
Other observations : It works for other letters.
If it is not an array type, then plain object works too, but not as an array
Small excerpt of the schema is as below :
{
"type": "object",
"id": "http://jsonschema.net/abc",
"required": true,
"description": "Some description",
"properties": {
"s": {
"type": "array",
"id": "http://jsonschema.net/abc/s",
"required": true,
"items": {
"type": "object",
"id": "http://jsonschema.net/price/abc/0/",
"required": true,
"description": "sales price object of an item",
"properties": {
"ip": {
"type": "number",
"id": "http://jsonschema.net/price/p/s/0/value",
"required": true,
"description": "some desc"
}
}
}
}
}
}
Has someone faced a similar issue/known bug? Is there a workaround?