OpenAPITools / OpenAPITools/openapi-generator

[BUG] Inconsistent comment in EnumTest.java

Open
#6,529 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

#6130 ### Description

This comment is inconsistent: https://github.com/OpenAPITools/openapi-generator/blob/e2e3405689e5fab0bf4e5545fdc8f0a393cb7b9d/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/EnumTest.java#L228

Suggest a fix

The method returns the value of enumNumber, rather than enumNumber itself. And if it is not set, it will return null.

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

Open samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/EnumTest.java at the referenced line and read the comment alongside the enumNumber accessor. Update the comment so it describes the returned enum value and null behavior accurately, then verify the generated sample remains consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
documentation
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.