NSwag icon indicating copy to clipboard operation
NSwag copied to clipboard

CSharpClient code generator issues

Open MihaMarkic opened this issue 2 months ago • 1 comments

I'm looking at this OpenAPI 3 schema: Bankart and C# generator generates wrong code (syntax error) on two issues:

  • ThreeDSecureData.3dsecure property - it generates constructor like public ThreeDSecureData(ThreeDSecureData_3dsecure? @3dsecure, ... where argument name can't start with a number and should be prefixed with an underscore public ThreeDSecureData(ThreeDSecureData_3dsecure? @_3dsecure instead. '@' doesn't do anything.
  • For some reasons it creates references to CLASS_NAME2 (it postfixes 2 to class name), like in Customer's paymentData argument - PaymentData2 instead of PaymentData) sometimes.

MihaMarkic avatar Apr 15 '24 14:04 MihaMarkic