Skip to content

[C# .NET 2.0] 'Event' & 'Response' words crush code-gen #4605

@aleksei-saharov

Description

@aleksei-saharov

Hi, all

I found that code generation to C# .NET 2.0 do not work if I use 'Event' or 'Response' word.

YAML

swagger: '2.0'

info:
  version: "1.0.0"
  title: <>
    
paths:
  /ping:
    get:
      parameters: []
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Response'
        '404':
          description: Success
          schema:
            $ref: '#/definitions/Event'
          
definitions:
  Event:
    type: object
    properties:
      Message:
        type: string
  Response:
    type: object
    properties:
      Code:
        type: integer
      Message:
        type: string

I got Code Generator Error. I did not have it with C# (not C# .NET 2.0) client generation.

I think that there are reserved words for generator but they did not flag as reserved.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions