Closed IceBlizz6 closed 12 months ago
EDIT: Everything I said here was completely off topic, so I removed it not to confuse future readers.
Looks like adding jackson-module-kotlin solved this issue. I like your idea of having a kotlin module for spqr. I may be able to contribute something. Right now i have:
Maybe we should continue this in a new discussion as i think this specific issue has been solved.
Ooh, sorry, I was completely off. All I said was about output types, and you were talking about input types. Yes, SPQR delegates the discovery of input fields to Jackson (or Gson, kind of). This way it avoids the insidious problem of everything seeming ok in the schema but failing to deserialize at runtime. Most Jackson configs should thus transparently work. So if you add the Jackson Kotlin module, making Jackson aware of Kotlin's quirky accessor naming, it should just start working in SPQR too, yeah.
And yes, let's continue the Kotlin SPQR module discussion elsewhere.
In Kotlin i have this class
Using javap then i see that this is equivalent to:
Trying to set up this as a unit test:
this unit test then fails:
Renaming isDelivered field to delivered will pass the unit test. However this is not a working solution because my code was generated from kotlin.
I can understand that it is unfortunate that Kotlin does not follow boolean naming convention in this regard. Sadly i have a lot of classes like this in my Kotlin project, most of these are auto generated. Would it be possible to solve this?