OpenAPITools / OpenAPITools/openapi-generator
[BUG] [JAXRS-CXF-Client] Missing Enum Getter
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
Generating a client via jaxrs-cxf-client generates models with the correct enums but is missing the fitting enum getter. Instead the only generated getters are returning a String based on enum.value().
openapi-generator version
3.3.4 / 4.0.0-beta2
OpenAPI declaration file content or url
https://gist.github.com/ryj67245/a550b64a5aa60638432a21bd43b25756
Command line used for generation
-g jaxrs-cxf-client
Steps to reproduce
- Generate via CLI
- Check Java source
- No getter for enum
Suggest a fix
Add getter for enum to template
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
Generate a client with the jaxrs-cxf-client generator using the linked OpenAPI declaration, then inspect the generated Java model source and the generator templates that produce its getters. Done means the generated model exposes a getter returning the enum as well as the existing String-based getter, with the behavior verified from a regenerated client.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100