jsonschema2pojo
jsonschema2pojo copied to clipboard
Support generating all types as inner classes of one class
Useful for generating all subtypes as inner classes in one main class. The default is one class corresponding to one subtype.
Thanks @zhouzhipeng. A few comments on this:
-
To be consistent with the other configuration properties of this plugin, could you call your new option
useInnerClasses
instead ofgenInnerClasses
? -
You don't yet have any integration tests for this new feature. Every new feature needs integration tests so that we can be sure the feature is not lost in the future. Can you turn
GenInnerClassExample.java
into some integration tests? You should think of some different scenarios in which this will be used and write tests for these. -
This part:
newType = _package.classes().next()._class(...);
Could you explain how it works?
_package.classes().next()
will just get the first class in the package. How does this work for the very first class we generate? I wonder if this will always be a good class to use :thinking:
Hey guys, is there any update on this feature please? It's something I need :)
Thanks
I need this feature too - is there anything I can do to help get it merged in?
@zhouzhipeng Thanks for the great work already, but could you please take a look at the review comments ? They seem to be rather minor and this feature would be a real plus... Would be great to integrate the change before the PR's anniversary :-)
If anyone is keen to use this, feel free to pick up the review comments yourself and created a new branch based on the work that's already been done by @zhouzhipeng.
What can we do to get this changes in? Im dependent on this change as well.