OpenAPITools / OpenAPITools/openapi-generator

Incorrect Time Format in pojo.mustache for DateTime Pattern

Open
#20,291 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

The current pojo.mustache template for the CXF Ext module in the OpenAPI generator seems to have an incorrect DateTime pattern in line 49:

https://github.com/OpenAPITools/openapi-generator/blob/b218e238f4f6cac8c919a78b296d3062bdfec0be/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pojo.mustache#L49

Problem:
The pattern uses hh for the hour, which refers to a 12-hour clock format (requiring AM/PM context). However, this context is not present in the pattern. If the goal is to format the time in 24-hour clock, the correct placeholder should be HH.

Suggestion:
Replace hh with HH to reflect the intended 24-hour time representation.

Thank you

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

Inspect modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pojo.mustache at line 49 and confirm how the DateTime pattern is used in generated Java POJOs. Replace the 12-hour placeholder with the intended 24-hour placeholder, then verify that the generated pattern represents 24-hour time without AM/PM context.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.