Treat a property as nullable #302
-
I need a way to treat a property as nullable even tho the source type declares it as non-nullable. The problem is I don't own the source type and in certain cases this "non-nullable" property is coming out as null 🙄. Any help appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
This is currently not possible with Mapperly. As a workaround you can exclude the property via the |
Beta Was this translation helpful? Give feedback.
-
Thanks, I've also noticed that when mapping a nullable struct to the same nullable struct it generates the following:
This is interpreted as:
instead of:
So instead of |
Beta Was this translation helpful? Give feedback.
This is currently not possible with Mapperly. As a workaround you can exclude the property via the
MapperIgnoreTarget
/MapperIgnoreSource
attributes and map it manually.