unchase/Unchase.OpenAPI.Connectedservice

Code generation enters infinite loop in v1.8.0

Opened this issue · 2 comments

Describe the bug

When reading a schema MyClass with properties being named MyClass and MyClass1, the service enters an infinite loop and can only be cancelled by shutting down Visual Studio 2022 via the task manager.
I suspect that this seems to be a problem with the newest version 1.8.0 of this extension, as there weren't any issues for me a few weeks ago.

Steps to reproduce

Store the following json-file locally and try to generate the code from it (check "Generate CSharp Client" and then in the CSharp Client Settings uncheck GenerateClientClasses)

{
  "openapi": "3.0.1",
  "info": {
    "title": "My Web API",
    "version": "v2"
  },
  "paths": {
  },
  "components": {
    "schemas": {
      "MyClass": {
        "type": "object",
        "properties": {
          "MyClass": {
            "type": "string"
          },
          "MyClass1": {
            "type": "string"
          }
        }
      }
    }
  }
}

Expected result

Previously the property MyClass was renamed to MyClass2 in the generated code.

Actual result

Upon hitting finish, the service enters an infinite loop. The console output gets stuck as shown on the screenshot below.

Screenshots

console_output

Hi, @MichaelF1989

Could you try again with v1.9.1?

Unfortunately, the problem seems to persist with v1.9.1.