Open sharifullin opened 7 years ago
Hi, what classes were generated and what did you want instead?
Following classes were generated Branch, Branch, ForeignAddress, ForeignAddress,LegalAddress, LegalAddress, ParsedAddressRF, ParsedAddressRF, ParsedAddressRF__, ParsedAddressRF__. But actually I don't need classes with an underscore symbol "".
I faced similar issue and then solved it by modifying the object rule and rule factory a bit. I created a Hash of Class Name, JSON node and the package using MD5 algorithm and stored it in a map. Before creating any new class I just check if it's hash already exists in the hashMap in which case I just return the class corresponding to that hash. Check my commit here : https://github.com/mdfaizanali786/jsonschema2pojo/commit/e5343db662ea648c5b0e559b3021aec43efd0299#diff-7fef584364765f2bd47a596ad18cecc4
See json schema below. Classes with underscore (after generating) are unwanted.