title: .NET Core [FromBody] annotation assigns default value instead of returning 400 error if value is missing
body: <p>I have created a controller method similar to</p>
  <pre class="lang-cs prettyprint-override"><code>[HttpPost]
  public ActionResult&lt;MyDTO&gt; Post([FromBody] MyDTO myDTO)
  {
      // do something with myDTO...
      Ok();
  }
  </code></pre>
  <p>and MyDTO:</p>
  <pre class="lang-cs prettyprint-override"><code>namespace MyNamespace.DTO
  {
      public class MyDTO
      {
          [Required]
          public int someNumber { get; set; }
  
          [Required]
          public bool someBool { get; set; }
  
          [Required]
          public DateTimeOffset someDate { get; set; }
      }
  }
  </code></pre>
  <p>When I send a post with a JSON body that doesn't have either defined, instead of returning a 400 or an exception of some sort, it just assigns default (falsy) values to them.</p>
  <p>When I defined a List of another DTO class, it did return a 400 code.</p>
  <p>How can I make the API return an error when certain required values are not provided instead of just using default values?</p>