title: FastAPI: How to map arbitrary-attribute dict to pydantic model to let swagger display detail
body: <p>I have a FastAPI project that one of its endpoint looks like this:</p>
  <pre class="lang-py prettyprint-override"><code>@app.post(
      response=SomePydanticModel() # how to compose SomePydanticModel here???
  )
  def my_end_point():
      response = {
          &quot;ZOOQ-700Z71&quot;: [
              {&quot;product_id&quot;: &quot;prod_001&quot;, &quot;product_name&quot;: &quot;Product 001&quot;, &quot;quantity&quot;: 10},
              {&quot;product_id&quot;: &quot;prod_002&quot;, &quot;product_name&quot;: &quot;Product 002&quot;, &quot;quantity&quot;: 20},
              {&quot;product_id&quot;: &quot;prod_004&quot;, &quot;product_name&quot;: &quot;Product 004&quot;, &quot;quantity&quot;: 30},
          ],
          &quot;0071-ZOGKNQ&quot;: [
              {&quot;product_id&quot;: &quot;prod_001&quot;, &quot;product_name&quot;: &quot;Product 001&quot;, &quot;quantity&quot;: 10},
              {&quot;product_id&quot;: &quot;prod_003&quot;, &quot;product_name&quot;: &quot;Product 003&quot;, &quot;quantity&quot;: 7},
              {&quot;product_id&quot;: &quot;prod_008&quot;, &quot;product_name&quot;: &quot;Product 008&quot;, &quot;quantity&quot;: 2},
          ],
          &quot;0071-Z0GKQ7&quot;: [
              {&quot;product_id&quot;: &quot;prod_002&quot;, &quot;product_name&quot;: &quot;Product 002&quot;, &quot;quantity&quot;: 12},
              {&quot;product_id&quot;: &quot;prod_007&quot;, &quot;product_name&quot;: &quot;Product 007&quot;, &quot;quantity&quot;: 6},
          ],
          &quot;ZZOQ-ZXOCT9&quot;: [
              {&quot;product_id&quot;: &quot;prod_004&quot;, &quot;product_name&quot;: &quot;Product 004&quot;, &quot;quantity&quot;: 100},
          ],
          &quot;2007-ZCKOZR&quot;: [
              {&quot;product_id&quot;: &quot;prod_004&quot;, &quot;product_name&quot;: &quot;Product 004&quot;, &quot;quantity&quot;: 30},
              {&quot;product_id&quot;: &quot;prod_005&quot;, &quot;product_name&quot;: &quot;Product 005&quot;, &quot;quantity&quot;: 20},
          ],
      }
  </code></pre>
  <p>As you can see that my response is arbitrary-attribute dict, its attributes formatted <code>xxxx-xxxxxx</code> are <strong>Purchase Order ID</strong>. How can I write <code>SomePydanticModel</code> to represent my response? Therefore, I want the swagger to show the description of my response.</p>