Context
In templates-v7/libraries/jersey3/pojo.mustache, the x-deprecatedMessage vendor extension is used to generate inline @Deprecated annotations with the deprecation message appended as a single-line comment:
@Deprecated // deprecated since Adyen Checkout API v50: - If your version is between 50 and 69, use `threeDSAuthenticationOnly` instead.
- If your version is 70 or later, use `authenticationData.authenticationOnly` instead.
When the x-deprecatedMessage value in the OpenAPI spec contains newline characters, the generated code breaks: the continuation of the message is placed outside the // comment, resulting in invalid Java syntax. This is visible in ThreeDS2RequestFields.java around lines 186–187.
Proposed Change
The @Deprecated annotation in pojo.mustache should not include the deprecation message as a single-line comment, since single-line comments cannot span multiple lines. The deprecation message is already safely included in the Javadoc block via the @deprecated tag (inside /** */), where multi-line content is handled correctly.
Change occurrences like:
@Deprecated // deprecated ...: {{{.}}}
to simply:
Benefit
Prevents invalid Java code from being generated when x-deprecatedMessage contains newline characters, while preserving the deprecation message in the Javadoc where it is safe and visible to IDEs and tooling.
Context
In
templates-v7/libraries/jersey3/pojo.mustache, thex-deprecatedMessagevendor extension is used to generate inline@Deprecatedannotations with the deprecation message appended as a single-line comment:When the
x-deprecatedMessagevalue in the OpenAPI spec contains newline characters, the generated code breaks: the continuation of the message is placed outside the//comment, resulting in invalid Java syntax. This is visible inThreeDS2RequestFields.javaaround lines 186–187.Proposed Change
The
@Deprecatedannotation inpojo.mustacheshould not include the deprecation message as a single-line comment, since single-line comments cannot span multiple lines. The deprecation message is already safely included in the Javadoc block via the@deprecatedtag (inside/** */), where multi-line content is handled correctly.Change occurrences like:
to simply:
Benefit
Prevents invalid Java code from being generated when
x-deprecatedMessagecontains newline characters, while preserving the deprecation message in the Javadoc where it is safe and visible to IDEs and tooling.