MapsterMapper / Mapster

A fast, fun and stimulating object to object Mapper
MIT License
4.31k stars 328 forks source link

Will you be adding an AssertConfigurationIsValid() equivalent? #446

Open darrenshrwd opened 2 years ago

darrenshrwd commented 2 years ago

Apologies if I have not found it and it exists, but do you have or plan to implement an AssertConfigurationIsValid() equivalent, as found in Automapper? This basically checks all maps are valid and we use from unit tests.

richardbartley commented 2 years ago

I too am wondering where I can do this sort of thing.

I see the TypeAdapterConfig.GlobalSettings.Compile(failFast: true) but it doesn't seem to do much, at least I can't see if its supposed to throw an error when RequireExplicitMapping and RequireDestinationMemberSource are set to true.

billhong-just commented 1 year ago

Any news on this issue? I'm experiencing the same problem.

Zamaletdinov commented 1 year ago

I'm also curious about this one. I tried to upgrade to a prerelease version (7.4.0-pre06), but it still validates neither during compile time nor during startup. It throws exceptions only during runtime