[C#] Issue with enum members
See original GitHub issueI very recently started to study the migration of our API from swagger-codegen to openapi-generator and I encounter a problem with enumeration members.
Our API is C# .NET Core based and the Swagger JSON is generated through the latest swashbuckle-aspnetcore I believe almost everyone is using in this context.
I’m using the latest stable of openapi-generator: 3.1.1
What the swagger-codegen generation looks like:
/// <summary>
/// Enum DataMatrix for value: DataMatrix
/// </summary>
[EnumMember(Value = "DataMatrix")]
DataMatrix = 2
What the openapi-generator generation looks like:
/// <summary>
/// Enum DataMatrix for value: DataMatrix
/// </summary>
DataMatrix = DataMatrix
This generation does not compile and gives a “The evaluation of the constant value for ‘BarcodeInfo.TypeEnum.DataMatrix’ involves a circular definition” error.
Any idea what is going on ?
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (13 by maintainers)
Top Results From Across the Web
Enumeration (or enum) in C - GeeksforGeeks
Enumeration (or enum) is a user defined data type in C. It is mainly used to assign names to integral constants, the names...
Read more >Using enum members with enum name in C - Stack Overflow
enum is a list of values, an "enumeration". It is not a struct/container class with members. Now what you should do for clarity...
Read more >C enum (Enumeration) - Programiz
In C programming, an enumeration type (also called enum) is a data type that consists of integral constants. To define enums, the enum...
Read more >What is Enum Data Type in C? How to Use It? - Simplilearn
Enumeration or enum in C is a special kind of user-defined data type. Learn its syntax, and how to implement enum in the...
Read more >"enum" members other than the first one should not be ...
C static code analysis: "enum" members other than the first one should not be explicitly initialized unless all members are explicitly initialized.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, he also mentioned that. Let me dig into it and hopefully file a PR shortly.
(sorry I missed your issue report earlier. busy with too many things…)
Hello all, the problem seem to be still present in all version above 5.1.1
I have just tried to generate csharp-netcore client from the onfido yml specs available here https://github.com/onfido/onfido-openapi-spec