SwaggerProvider icon indicating copy to clipboard operation
SwaggerProvider copied to clipboard

text/csv response type becomes unit

Open spaasis opened this issue 6 months ago • 0 comments

Hi and thanks for the awesome library! I'm trying to generate a client for a spec like this:

openapi: 3.0.1

paths:
  /timeSeries/csv:
    get:
      tags:
        - TimeSeries
      operationId: get-timeseries-csv
      parameters:
        - name: StationId
         //snip
      responses:
        '200':
          description: OK
          content:
            text/csv:
              schema:
                type: string
              examples:
                default:
                  value:

This generates a client method of:

.Client.GetTimeseriesCsv(?stationId: Guid, ...) : Threading.Tasks.Task<Unit>

So the response type is Unit instead of string

I see by searching that e.g. text/html or text/xml is mentioned quite a few times, but no text/plain or text/csv.

Would it be a difficult task to add support for plain text return values?

spaasis avatar Jun 27 '25 20:06 spaasis