-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Multiple Packages #145
Comments
Yes you can do this in 0.4.0, just put two subfolders in your schema directory (auth and catalog) and point jsonschema2pojo at the parent directory. Use com.my.domain as the target package. Classes generated from the auth directory will be put into com.my.domain.auth and classes generated from the catalog directory will be put into com.my.domain.catalog. There's also a PR you can merge into your own fork if you want that does exactly what you describe. Check out the discussion there (it's the only open PR). Rather than opening lots of issues it might be better if you send this kind of question to the mailing list as a first point of call. Cheers |
Will do. However, I did open a new issue that seems to be a legitimate bug a few minutes ago. |
Have this issue with v0.4.26. Maven plugin seems not generated the package when used in jenkins but worked in local machine. Any ideas? |
Hello, I'm trying to solve similar problem using gradle jsonschema2pojo 1.0.1 . To achieve this, we put the json schemas in two different folders eg /json/xyz and json/abc and configure but when I run gralde command it didn't generate POJO in separate package but rather all POJOs created in default package. Is there anything I'm missing? any additional configuration needed? please help us with your expertise Thanks in advance ! |
Do the schemas have |
Hello, Even I am facing same issue mentioned by @mdnuro and I am using Gradle plugin 1.0.1. Seems like this fix/feature is not moved to Gradle plugin. @joelittlejohn Since its not generating in proper packages I have added javaType in json schema as work around and its generating in proper packages. |
Is it possible to create package for a subdirectory inside subdirectory to create a common target Package? when I tried to give source = files("${sourceSets.main.output.resourcesDir}/schema") it generates imports i wrong packages. |
Is there a way to configure the maven plugin to generate schemas in multiple packages? For example instead of:
Why cant we have:
The text was updated successfully, but these errors were encountered: