OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
20.69k stars 6.31k forks source link

[BUG] [JAVA][ASCIIDOC] Bug with converting enums to asciidoc #12266

Open glei034 opened 2 years ago

glei034 commented 2 years ago

Bug Report Checklist

Description

Enums inside of my json will only show up as an empty title inside of Asciidoc files generated with the Maven Plugin, with $refs to them also not linking up to them.

openapi-generator version

5.4.0

OpenAPI declaration file content or url

As an example, an enum like this:

      "Priority": {
        "type": "string",
        "enum": [
          "LOW",
          "NORMAL",
          "HIGH",
          "VERY HIGH"
        ]
      }

would end up being created like this: grafik

Is this a known issue or am I doing something wrong?

joesoe1 commented 1 year ago

Hi, I have the same problem. Probably a bug. Have you by any chance found a workaround in the meantime?

Falco20019 commented 1 year ago

Same problem here, definitely a bug. Still not working in 7.0.0-SNAPSHOT. Right now, enums only work if they are defined on a field and will be shown in the DataFormat section. But if you define a full type as enum (in case it's used multiple times), it won't generate anything.