OpenAPITools / OpenAPITools/openapi-generator
[BUG][JAVA] Enum DTO is generated empty
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
My issue is that the DTO generated out of this schema:
"server__routers__v0___set_session_param__Request__eParam": {
"type": "string",
"enum": [
"workshop",
"apparatus",
"dataset"
],
"title": "eParam"
}
is empty, however having similar schema:
"server__routers__v0___predict_process__eParam": {
"type": "string",
"enum": [
"predictProcess",
"predictFinalProductInKg"
],
"title": "eParam"
}
successfully generates me complete DTO.
I tried to edit the fields of the enum thinking that I might use some keyword but without success.
My specification is v3.1.0
openapi-generator version
7.2.0 maven plugin
OpenAPI declaration file content or url
Generation Details
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing Java DTO generation with the two enum schemas in the issue, using the OpenAPI Generator 7.2.0 Maven plugin and OpenAPI 3.1.0. Compare the generated DTOs and narrow down why one enum is empty; done means the affected schema generates the same complete enum structure as the working example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100