Closed ark-1 closed 4 months ago
As i thought the expected result should be:
data class Match(
val firstTeam: FirstTeam,
val secondTeam: FirstTeam
)
data class FirstTeam(
val hometown: Hometown,
val stats: Stats
)
data class Hometown(
val name: String
)
data class Stats(
val rating: Int
)
as 'FirstTeam' same with 'SecondTeam' Maybe you need update your UT check
Currently, only classes with the same name (not considering XX suffixes) are deduplicated. There's no code for deduplicating classes with different names. And the code for classes with same names is broken. I suggest fixing that (by merging #426), and opening another issue if you want to extend this behavior to classes with different names (which I don't expect to be trivial).
Steps to reproduce: Input the following JSON:
Expected output:
Actual output:
StatsX
was not generated, but is referenced fromSecondTeam
.