OpenAPI 3.0 Generic Data types : <p>How can I best describe a generic response type which includes the real data type in OpenAPI 3.</p>

<p>Simplified example:</p>

<pre><code>ApiResponse:
  data: object
  error: string
</code></pre>

<p>But the /users endpoint should give:</p>

<pre><code>ApiResponse&lt;List&lt;User&gt;&gt;
</code></pre>

<p>So that basically is:</p>

<pre><code>ApiResponse:
  data: List&lt;User&gt;
  error: string
</code></pre>

<p>It looks like this is not possible at the moment, but just want to make sure.
I guess the best way to do this now is to make named responses for every call and use allOf to refer to ApiResponse and implemenent data: specific value.</p>
