title: How to properly document text/csv responses on swagger/yaml docs?
body: <p>I have a bunch of API endpoints that return <code>text/csv</code> content in their responses. How do I document this? Here is what I currently have:</p>
  
  <pre><code>  /my_endpoint:
      get:
        description: Returns CSV content
        parameters:
          - $ref: '#/components/parameters/myParemeters'
        responses:
          200:
            headers:
              $ref: '#/components/headers/myHeaders'
            content: text/csv
  </code></pre>
  
  <p>As it stands, this does not work and I get the note in the Swagger preview:</p>
  
  <blockquote>
    <p>Could not render this component, see the console.</p>
  </blockquote>
  
  <p>The question is how do I properly display the content for csv responses? I find if does work if I do add a schema, something like this:</p>
  
  <pre><code>...
    content:
        text/csv:
          schema:
            type: array
            items:
              type: string
  ...
  </code></pre>
  
  <p>But there shouldn't be a schema since it is csv. So to go back to the question, what is the proper way to describe the csv response content?</p>