title: Why does Swagger show "422 Validation Error" under the responses section of my docs?
body: <p>I'm building a REST API with Python's <a href="https://fastapi.tiangolo.com/" rel="nofollow noreferrer">fastapi</a>. One benefit of fastapi is that it automatically generates API docs using <a href="https://swagger.io/" rel="nofollow noreferrer">Swagger</a>.</p>
  <p>Here I've define a dummy <code>delete()</code> path operation.</p>
  <pre><code>from fastapi import FastAPI, status
  
  app = FastAPI()
  
  @app.delete('/blog/{id}', status_code=status.HTTP_204_NO_CONTENT)
  def delete_blog(id: int):
      return &quot;test&quot;
  </code></pre>
  <p>When I visit the auto-generated swagger docs (<a href="http://127.0.0.1:8000/docs" rel="nofollow noreferrer">http://127.0.0.1:8000/docs</a>), my delete endpoint shows 422 Validation Error under <em>Responses</em>.</p>
  <p><a href="https://i.stack.imgur.com/N68Y9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/N68Y9.png" alt="enter image description here" /></a></p>
  <p>Where does this come from? Why don't see 422 Validation error when I create a <code>get()</code> path operation? And why don't I see other possible Responses like 500?</p>