Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kotlin API fails on methods that don't return anything (which currently just includes `delete` methods) because the generated code by default tries to serialize the methods' return types in all cases, even if the return type is `Unit`. I'm not exactly sure whether this is properly a bug in the openapi generator or in moshi. In any case, I was unable to fix the error by doing what initially seemed most sensible, which was to register a moshi adapter for the `Unit` type. The fix here is not terribly elegant but in practice seems to fix the issue. I will also see about opening/adding to an existing issue on the openapi generator's github page and/or submitting a PR to fix this upstream. Note also that I've removed the `Serializer.kt` template, which is unused. We've already got an actual `Serializer` class stored in the generated code folder, so there's no reason to have the template. Fixes #1117.
- Loading branch information