[BUG][C#][API client: csharp] Integer Enumeration produce same code as String Enumeration
Created by: erezgeva
Description
When generatin API client for C#. the code for Integer Enumerator produce have the same properties as if it was a String Enumerator.
openapi-generator version
4.2.0
OpenAPI declaration file content or url
openapi: 3.0.0
info:
version: "1"
title: BUG Report
paths:
/Create:
put:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/new_item'
responses:
default:
description: return
content:
application/json:
schema:
$ref: '#/components/schemas/new_item'
components:
schemas:
new_item:
properties:
class:
type: string
enum:
- high
- low
size:
type: integer
format: int8
enum:
- 2
- 4
- 8
Command line used for generation
java -jar openapi-generator-cli.jar generate -i my.yaml -g csharp
Steps to reproduce
Just run the command and compare JSON attribute of "enum ClassEnum" and "enum SizeEnum" at src/Org.OpenAPITools/Model/NewItem.cs
Related issues/PRs
Resamble but more simple then: https://github.com/OpenAPITools/openapi-generator/issues/3246
Suggest a fix
The JSON attribute "[JsonConverter(typeof(StringEnumConverter))]" should be used on string Enomurators, but should be omit in case of Integer Enomurators.