Open poliez opened 6 years ago
This is related to issues discussed here: https://github.com/trbngr/infusio/issues/17
Unfortunately, the real source of the enum problems are in the code generation that creates the API client, dsl and dto classes. However, what you're doing in the pull request does address the number vs value expression/parsing problem and could probably be moved to the code generator templates.
I just went through Dto.liquid
and definitely think that you are right. I didn't pay attention to the .liquid files today at work. I was in a rush and just wanted it to work 😃
10 minutes ago i didn't know anything at all about the Liquid project itself 😅
I also looked at infusionsoft.json
and all his enum
attributes. As you said, updating Dto.liquid
with [JsonConverter(typeof(StringEnumConverter))]
in the right place could fix the problem. I'm going to try this now!
In no more than two days i'm going to test it and submit a pull request if all goes as expected! (If I'm misbehaveing about how to write commits or how to submit pull-requests and when just let me know, please! It could be really valuable information 😄)
Thanks @Poliez !
I'm sorry for being out of touch lately, guys. Just busy busy.
When creating a new contact, if it does include an email, which has a "Field" attribute, it gets serialized like
Instead of
I've already solved this issue and will provide a pull request in a few minutes!