PokeAPI / pokekotlin

Kotlin (or Java, Scala, etc) client for PokeApi
Apache License 2.0
171 stars 43 forks source link

Models not compatible with Jackson #83

Closed stocky37 closed 3 years ago

stocky37 commented 3 years ago

Hi, I'm trying to use the models with a Jackson/Jaxrs client, but get errors since the id and category fields on ApiResource and NamedApiResource don't actually exist on the incoming JSON.

I could implement something similar to your ApiResourceAdapter, but for Jackson, but I thought default, lazy values on the classes would make more sense so they can be used as-is more widely. Ideally, this would also let us be able to remove the custom adapters in this repo, but it looks like Gson has issues with default values on kotlin classes.