-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to generate from schema due to "Path not present" #1588
Comments
Generating java classes from a sample json on https://www.jsonschema2pojo.org/ also works. I attach the sample here. |
Hi As a workaround you could try set jsonSchema2Pojo {
source = files("${sourceSets.main.output.resourcesDir}/falsstprv_schema.json")
targetDirectory = file("${project.buildDir}/generated/sources/js2p")
targetPackage = 'sample'
refFragmentPathDelimiters = '#/'
} |
Thanks, i got further using refFragmentPathDelimiters. Generation completes but cannot compile due to lots of "duplicate class" errors e.g.
Is there a config i can do to address that? |
I'm not sure if it has anything to do with jsonSchema2Pojo plugin. |
OK thank you! In the process of creating a SSCCE i found an issue on my side and the problem with duplicate classes was resolved. The working SSCCE can be found here: https://github.com/perNyfelt/jsonSchema-path-not-present. |
Using the attached schema: falsstprv_schema.json the jsonSchema2Pojo fails with the following error "Path not present: fals"
the gradle build script calls the plugin as follows
I noticed that it is possible to process and generate Java pojos at https://json2csharp.com/code-converters/json-to-pojo so I suspect the problem is due to some bug in the jsonschema2pojo plugin.
The text was updated successfully, but these errors were encountered: