JsonToKotlinClass icon indicating copy to clipboard operation
JsonToKotlinClass copied to clipboard

"Init with null when nullable" property doesn't work when making multiple files

Open matteo-bloomandwild opened this issue 2 years ago • 1 comments

Hello, I noticed that if I generate a model with all inner classes in the same file, and configured to initialise with null everything that is nullable, the plugin works as expected. If I generate the exact same json, with the exact same config except not using a single file, the non-native fields are initialised with the corresponding inner object, not null.

matteo-bloomandwild avatar Jan 11 '23 11:01 matteo-bloomandwild

Hi @matteo-bloomandwild, could you provide a minimal working example?

eirnym avatar Jan 11 '23 11:01 eirnym