quarkiverse / quarkus-openapi-generator

OpenAPI Generator - REST Client Generator
Apache License 2.0
119 stars 80 forks source link

StackOverflowError with object having an array of itself #673

Open a819694114 opened 7 months ago

a819694114 commented 7 months ago

I have the schema snippet like this

"Something": {
  "type": "object",
  "properties": {
    "someGroup": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Something"
          }
        ]
      }
    }
  }
}

It went into infinite loop. When I change to this

"Something": {
  "type": "object",
  "properties": {
    "someGroup": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "type": "string"
          }
        ]
      }
    }
  }
}

The generation succeeded.

ricardozanini commented 7 months ago

@a819694114 do you mind telling us in which extension you're seeing this error? (server or client)?

a819694114 commented 7 months ago

@a819694114 do you mind telling us in which extension you're seeing this error? (server or client)?

Hi, I am using the server extension.

github-actions[bot] commented 4 months ago

@ricardozanini @hbelmiro This is being labeled as Stale.