OpenAPITools / OpenAPITools/openapi-generator

[BUG] [JAXRS-CXF-Client] Missing Enum Getter

Open
#2,200 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
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
  1. Generate via CLI
  2. Check Java source
  3. No getter for enum
Suggest a fix

Add getter for enum to template

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.