Swagger is generating below documentation.

enter image description here

In my code, I am returning ValidationError object and it’s not returning that.

enter image description here

Here is the ValidationError class.

enter image description here

Is this anything wrong with my mapping or do I have to write down my own TranslateResultToActionResult attribute to achieve it?