gameadsstudio / Back-End

Game Ads Studio API
1 stars 1 forks source link

Change the model validation errors output #24

Open Tolkie opened 3 years ago

Tolkie commented 3 years ago

Current output looks like { "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1", "title": "One or more validation errors occurred.", "status": 400, "traceId": "00-b639e7886ee9044090af6bd072b5237d-11188e924e2fd748-00", "errors": { "LastName": [ "The LastName field is required." ] } } We should remove the type and traceId fields.

Tolkie commented 3 years ago

https://stackoverflow.com/questions/51125569/net-core-2-1-override-automatic-model-validation https://www.jerriepelser.com/blog/validation-response-aspnet-core-webapi/