Skip to content

useObjectMapperForRequestSerialization doesn't work for Kotlin #995

@jay3047

Description

@jay3047

Hi ,

I am trying to use this plugin option 'useObjectMapperForRequestSerialization' for Kotlin generated classes but it doesn't add useObjectMapper as true for relevant field(in toString method).
I tried to debug the code and found that **

type.ftl

** under template/kotlin-lang doesn't check field.serializeUsingObjectMapper for toString generation.
I did tried to fixed this by updating template as below and tested in local it worked fine and i was able to use custom serializer using internal object mapper.
<#if toStringForRequest> joiner.add("${field.originalName}: " + GraphQLRequestSerializer.getEntry(${field.name}**<#if field.serializeUsingObjectMapper>, true</#if>))**; <#else>

Wanted to know if this is a miss or is there any intent behind leaving this option out for KOTLIN generated classes.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingkotlinPull requests that update Kotlin code

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions