Open beirtipol opened 8 years ago
I'm not sure what the format of this file is, but it doesn't appear to be a json schema. I don't think you're going to have any luck trying to use this schema with jsonschema2pojo.
Would it be possible to simply use some example json payloads instead? (and set the source type to JSON).
I was wondering about that. The API documentation describes it as a schema and it does appear to have the fields listed in the json schema reference so I presumed it was a different schema format.
I'll have to manually craft it up
On Fri, 26 Feb 2016, 20:32 Joe Littlejohn, notifications@github.com wrote:
Reopened #508 https://github.com/joelittlejohn/jsonschema2pojo/issues/508.
— Reply to this email directly or view it on GitHub https://github.com/joelittlejohn/jsonschema2pojo/issues/508#event-568159259 .
Still a valid request though? To output more information about the parsing error location
This is a bit tricky as the original source location is lost after we parse the document. The problem here is that your document has been parsed correctly, but the field name 'additionalProperties' conflicts with the name of the field we use to store additional (unrecognised) properties.
It looks like this document has some JSON schemas within it, even though the document itself is not a JSON schema. You seem to have used sourceType=JSON, but I don't think that's what you want (you need to supply an example payload if you use sourceType=JSON, not a schema).
Re providing more information for this kind of error, yes, I definitely think this is still a valid request. One thing we could do is print the schema that was being processed when the exception occurred. This should give you a much better chance of working out where the error is.
I'm trying to use this through Maven to generate classes from the Kodi schema http://kodi.wiki/view/JSON-RPC_API/v6
Schema file: kodischema.zip
When using 'jackson' style, I get this error but it does not give any indication as to which object is failing to parse Generation is erroring due to
Pom config
If I use gson parsing, it generates java classes but many of the object types are duplicated with underscores after their names which makes them unusable.