Skip to content

[csharp] Multiple response types not supported #1562

@scott-lin

Description

@scott-lin
Description

When multiple responses are present in a v3 OpenAPI document with differing types, only the first one is respected when C# client SDK is generated.

openapi-generator version

3.3.3

OpenAPI declaration file content or url
  /my/api/path:
    get:
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
                  format: byte
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Microsoft.OpenApi.Services.AutoRestService.ServiceFault'
Command line used for generation

openapi-generator generate -g csharp -i .\openapi.json -o .\output

Related issues/PRs

I see similar issues for other languages, but perhaps C# isn't enhanced yet?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions