-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug, Java, Restclient]: array-param / body leads to generated API class with missing import for jakarta.validation.Valid #18974
Comments
I have the same problem, in addition to this one, which is quite similar: #17617 |
@hdva2502 this issue is fixed from master branch |
@hdva2502 the same issue here ;/ |
@vanduc2514 but seems this fix from master does not included in latest openapi-generator 7.8.0? how its possible? |
Funny enough, the issue I reported is gone with 7.8.0. Thanks a ton, |
@hdva2502 maybe you had override api.mustache in your project? because in https://repo1.maven.org/maven2/org/openapitools/openapi-generator/7.8.0/ jar contains *openapi-generator-7.8.0.jar\Java\libraries\restclient* without
|
Hi folks,
Description
having on openapi file that contains array-types as "root type" which are then translated into List<>-parameters of methods in java classes, the "line type" of the list is annotated with
@Valid
, however the import statement is missing and in turn the generated class contains a syntax error.openapi-generator version
7.6.0
OpenAPI declaration file content or url
Command line used for generation
Generated via maven plugin with following execution settings:
Steps to reproduce
The generated code will look like this:
The problem is the
@Valid
-Annotation in e.g.List<@Valid ArrayBodyItemType> arrayBodyItemType
which is ok, but there is neither an import statement nor it's fully qualified like@jakarta.annotation.Generated
Please have a look.
Thanks in advance,
Andreas
The text was updated successfully, but these errors were encountered: