title: How to generate a strict json schema with pydantic?
body: <p>I recently started to use pydandic to generate JSON schemas for validating data but I found the by default the generated schema does not complain about unknown keys inside my BaseModel.</p>
  <p>Example:</p>
  <pre><code>class Query(BaseModel):
      id: str
      name: Optional[str]
  </code></pre>
  <p>The generated schema would pass validation even if the object has other attributes than the two one mentioned here.</p>
  <p>How can I assure validation will fail if someone adds a &quot;foo: bar&quot; property?</p>