Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useObjectMapperForRequestSerialization doesn't work for Kotlin #995

Closed
jay3047 opened this issue Sep 2, 2022 · 4 comments
Closed

useObjectMapperForRequestSerialization doesn't work for Kotlin #995

jay3047 opened this issue Sep 2, 2022 · 4 comments
Assignees
Labels
bug Something isn't working kotlin Pull requests that update Kotlin code
Milestone

Comments

@jay3047
Copy link
Contributor

jay3047 commented Sep 2, 2022

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.

@jxnu-liguobin
Copy link
Collaborator

I think it's miss. 🥲

@jay3047
Copy link
Contributor Author

jay3047 commented Sep 4, 2022

Can we get this added please.

kobylynskyi pushed a commit that referenced this issue Sep 5, 2022
* use objectMapperForSerialization for kotlin type classes

* removing Typo and test fix

Co-authored-by: Jay Shankar Gupta <JayShankar_Gupta@intuit.com>
@kobylynskyi kobylynskyi added this to the 5.5.0 milestone Sep 5, 2022
@kobylynskyi kobylynskyi added bug Something isn't working kotlin Pull requests that update Kotlin code labels Sep 5, 2022
@kobylynskyi
Copy link
Owner

Will be released in version 5.5.0 soon

@jay3047
Copy link
Contributor Author

jay3047 commented Sep 6, 2022

Will be released in version 5.5.0 soon
Thanks @kobylynskyi , is there any ETA for release ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working kotlin Pull requests that update Kotlin code
Projects
None yet
Development

No branches or pull requests

3 participants