Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #361
Closed
Open
Issue created Jun 20, 2018 by Administrator@rootContributor

[csharp] localVarHttpHeaderAccepts list not being generated correctly

Created by: alexl0gan

Description

localVarHttpHeaderAccepts list not being generated correctly. List is missing brackets and contains titles of example responses.

openapi-generator version

3.0.2

OpenAPI declaration file content or url
'/v3/example':
    post:
      summary: example
      parameters:
        - in: body
          name: identity
          schema:
            $ref: '#/definitions/Id'
          required: true
      description: description
      tags:
        - Public API
      responses:
        201:
          description: created
          schema:
            $ref: '#/definitions/Identity'
          examples:
            'Success':
              object: 'example'
        400:
          description: Bad request. The enrollment identity is not valid.
          schema:
            $ref: '#/definitions/ErrorResponse'
        401:
          description: The provided access token is not valid.
          schema:
            $ref: '#/definitions/ErrorResponse'
          examples:
            'Authentication Error':
              object: 'error'
        409:
          description: |
            Conflict.
            $ref: '#/definitions/ErrorResponse'
          examples:
            'Conflict':
              object: 'error'
            'Already claimed':
              object: 'error'

This produces

// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
    "application/json",
    "Success"
    "Authentication Error",
    "Already claimed",
    "Conflict",
};

This occurred after migrating from swagger codegen 2.2.3.

Assignee
Assign to
Time tracking