Closed akghasemi closed 4 years ago
Hi, @akghasemi Could you describe your issue in more detail?
this is the class that is being generated for enums by swagger code generator. as you can see the enum names are replaced with Number_0 , etc and Enum names are part of summary
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.ComponentModel.DataAnnotations;
using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter;
namespace IO.Swagger.Model
{
/// <summary>
/// <br>0 = Normal ()<br>1 = Advanced ()
/// </summary>
/// <value><br>0 = Normal ()<br>1 = Advanced ()</value>
[JsonConverter(typeof(StringEnumConverter))]
public enum EnmUserType
{
/// <summary>
/// Enum NUMBER_0 for value: 0
/// </summary>
[EnumMember(Value = "0")]
NUMBER_0 = 1,
/// <summary>
/// Enum NUMBER_1 for value: 1
/// </summary>
[EnumMember(Value = "1")]
NUMBER_1 = 2
}
}
@akghasemi This extension fixes generation by adding descriptions to enum elements. It does not change the mechanism of generation.
the problem is that if I am going to fix that ,I have to add StringEnumConverter then Unchase library fails
It only works without StringEnumConverter
.
Hi this Enum fix still doesn't fix the problems in swagger code generator and Enums are still generated in wrong way