swagger-gradle-codegen
swagger-gradle-codegen copied to clipboard
Add null value handling for kotlin TypesAdapters
PR for #109
@macisamuele @martinbonnin @cortinico Any thoughts on this PR?
We spent a day and a half debugging this issue and @mikeyshean discovered that toJson needs to handle null values otherwise it triggers an issue in Moshi thinking there is a nesting problem and exception gets thrown by Moshi.
@mikeyshean thank a lot for the contribution 🎉
The pr looks sane to me, but I need some time to verify it. It looks surprising that we haven't face this issue before.
Something that for sure I'll ask is to have testing coverage over the change and ideally a unit test in samples/junit-test that ensures no further regressions around this.
Any news on this?
Sorry, the project we were using this on was canceled. @klaszlo8207 feel free to pick up this PR and add a regression test to it.