From b0f41a8ef44d1018dd123161329d8e790fab78b9 Mon Sep 17 00:00:00 2001 From: julianshess Date: Thu, 12 Dec 2024 08:16:02 +0100 Subject: [PATCH] Incorrect Time Format in pojo.mustache for DateTime Pattern 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. --- .../src/main/resources/JavaJaxRS/cxf-ext/pojo.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pojo.mustache index 8f5d70e41922..b22471d4f06a 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pojo.mustache @@ -46,7 +46,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") {{/isDate}} {{#isDateTime}} - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'hh:mm:ss.SSSX") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSX") {{/isDateTime}} {{#vendorExtensions.x-field-extra-annotation}} {{{vendorExtensions.x-field-extra-annotation}}}