title: How to create a webapi that allows dynamic objects with validation
body: <p>I'm trying to create a webapi that receives a array of json object in the body, like so:</p>
  <pre class="lang-c# prettyprint-override"><code>[HttpPost]
  public IActionResult Example([FromBody] JObject[] objects) {}
  </code></pre>
  <p>Every object that is being send needs to have an property <code>Id</code> and <code>ObjectId</code>, how can I validate the objects.</p>
  <p>I tried to create an class with the properties Id and ObjectId, that inherits from <code>DynamicObject</code>, to allow additional properties. But that doesn't seem to work.</p>