Open wilx opened 1 month ago
It might be a mistake in pojo.mustache in L66-68
I try to change
{{#vendorExtensions.x-field-extra-annotation}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
to
{{#vendorExtensions.x-field-extra-annotation}}
{{#.}}
{{{.}}}
{{/.}}
{{/vendorExtensions.x-field-extra-annotation}}
and it works perfect.
Here are steps what I do.
src/main/resources/mustache
pojo.mustache
file as what I say beforetemplateDir = "$projectDir/src/main/resources/mustache"
.
(Just on Gradle, maybe different on maven)
Bug Report Checklist
Description
The Java Spring generator produces invalid Java source. The documentation suggests that the
x-field-extra-annotation
parameter is a list of extra annotations:However, in generated code it outputs the annotations between
[]
and also multiple times when there are multiple annotations in the list, e.g.:openapi-generator version
7.9.0
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Run with the OpenAPI document above.
Related issues/PRs
Suggest a fix
The list of the annotations should be concatenated with a space.