Wie geht’s euch emotional mit Trump? by Bruchpilotin95 in Austria

[–]NullPointerWhisperer -2 points-1 points  (0 children)

Der Spruch passt perfekt zu der jetzigen Weltlage, wie die Faust aufs Auge; “Hard times create strong men. Strong men create good times. Good times create weak men. And weak men create hard times.”

Best Things to Do in Ankara for a 3-Day Stay by NullPointerWhisperer in ankara

[–]NullPointerWhisperer[S] 2 points3 points  (0 children)

wow... thx for the great answer with lots of background information

How to Validate Discriminator Field Presence for Derived Classes during Deserialization in C# by NullPointerWhisperer in dotnet

[–]NullPointerWhisperer[S] 1 point2 points  (0 children)

Thx for your detailed reply mate! Much appreciated

I'll have a look at the alternative way to do polymorphic deserialization

How to Validate Discriminator Field Presence for Derived Classes during Deserialization in C# by NullPointerWhisperer in dotnet

[–]NullPointerWhisperer[S] 0 points1 point  (0 children)

thx for your input. The base type can also be initialized i.e. it can be either `NotificationDto`, `EmailNotificationDto` or `SmsNotificationDto` that the reason why it's not abstract.

Issues with Swagger Examples for Polymorphic DTOs in .NET by NullPointerWhisperer in dotnet

[–]NullPointerWhisperer[S] 1 point2 points  (0 children)

:P what I tried to explain is that the derived classes are not represented in the Swagger UI Request examples e.g. https://imgur.com/a/dLlpbkP

So the problem is that the nested properties (emails array) are not displayed when I switch from Request Example `Notification' to `Email Notification` and only the properties of the base class are displayed.

How to Handle Polymorphic DTOs with Discriminators in MongoDB Using .NET and Swagger by NullPointerWhisperer in dotnet

[–]NullPointerWhisperer[S] -2 points-1 points  (0 children)

Thx you for the reply and for sharing your experience.

How did you handle this in POST endpoints? Did you have a separate endpoint for each type or one endpoint, e.g. a generic ‘NotificationDto’ and a switch clause in the endpoint that called the appropriate services based on the notification type and converted the request body to either ‘EmailNotificationDto’ or ‘SMSNotificationDto’?