Description
Overriden objectmapper is not used in deserialisation because in the api.mustache there is a typo so there is a new ApiInvoker creation every time you deserialise a response via the companion object. The side effect is that you cannot override the object mapper in the invoker.
api.mustache
{{#returnType}} Some(ApiInvoker.deserialize(s, "{{returnContainer}}", classOf[{{returnBaseType}}]).asInstanceOf[{{returnType}}])
Steps to reproduce
Generate any Scala client from any swagger document. See samples..
Suggest a Fix
Change api.mustache to be the following
{{#returnType}} Some(apiInvoker.deserialize(s, "{{returnContainer}}", classOf[{{returnBaseType}}]).asInstanceOf[{{returnType}}])
I have a fix ready to PR.
Description
Overriden objectmapper is not used in deserialisation because in the api.mustache there is a typo so there is a new ApiInvoker creation every time you deserialise a response via the companion object. The side effect is that you cannot override the object mapper in the invoker.
api.mustache
{{#returnType}} Some(ApiInvoker.deserialize(s, "{{returnContainer}}", classOf[{{returnBaseType}}]).asInstanceOf[{{returnType}}])
Steps to reproduce
Generate any Scala client from any swagger document. See samples..
Suggest a Fix
Change api.mustache to be the following
{{#returnType}} Some(apiInvoker.deserialize(s, "{{returnContainer}}", classOf[{{returnBaseType}}]).asInstanceOf[{{returnType}}])
I have a fix ready to PR.