Unchase.OpenAPI.Connectedservice icon indicating copy to clipboard operation
Unchase.OpenAPI.Connectedservice copied to clipboard

Code generation enters infinite loop in v1.8.0

Open MichaelF1989 opened this issue 2 years ago • 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

MichaelF1989 avatar Dec 20 '22 09:12 MichaelF1989

Hi, @MichaelF1989

Could you try again with v1.9.1?

unchase avatar Jun 05 '23 13:06 unchase

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

MichaelF1989 avatar Jun 21 '23 06:06 MichaelF1989