'how to remove "type", "title", "traceId": from FluentValidation response in .net core 6

I am using FluentValidation to validate my api request model.

I want to remove "type","title","traceId" from FluentValidation response.

How I can do this in .net core 6 ?

FluentValidation response:

{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1", 
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "00-8c3b4249b59b316dc6f50d49851844ef-5e09e9b0133b949b-00",
"errors": {
  "Amount": ["'Amount' must not be empty."]
  }
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source