Conversation
|
I believe the struct fields that aren't being deserialized will have to be wrapped with Option, to ensure that deserialization is performed properly. We can't use One example is of this is |
|
@LouisGariepy Please let me know your thoughts on this whenever you get a chance. |
|
Hi Faraz! Sorry for the delay. I do believe it would be possible to implement Deserialize for the "owned" variant of generated types. I'm not sure about this comment though
Could you clarify what you mean by "fields that aren't being deserialized"? Do you mean that you would want you api to accept missing fields? In the structs generated by Cornucopia, Option means that the attribute is nullable in the database. We can't make fields optional based on whether they are In my opinion, the
@farazfazli Maybe I'm misunderstood what you meant though. Please let me know and don't hesitate to correct me if that's the case. Thanks for your contributions! |
|
Is this PR still considered? |
Closes #203. WIP.