openapi-generator
openapi-generator copied to clipboard
[BUG] [java][restclient] Fix missing javax validation imports with list validation
Bug Report Checklist
- [ ] Have you provided a full/minimal spec to reproduce the issue?
- [x] Have you validated the input using an OpenAPI validator (example)?
- [x] Have you tested with the latest master to confirm the issue still exists?
- [x] Have you searched for related issues/PRs?
- [ ] What's the actual output vs expected output?
- [ ] [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
Similar to https://github.com/OpenAPITools/openapi-generator/pull/18332, building a rest client does not include the import statements.
List<@Valid AccountRequest> accountRequest
In the above sample, Valid is not found.
openapi-generator version
7.8.0
Generation Details
Spring Boot 3, Spring Framework 6, openapi generator 7.8.0, java17
{
"groupId":"com.test",
"artificactId": "account-client",
"modelPackage": "com.test.model",
"apiPackage": "com.test.api",
"useBeanValidation": "true,
"useTags": true,
"hideGenerationTimeStamp": true,
"dateLibrary": "java8-localdatetime",
"library": "restclient",
"useJakartaEe": true
}
Steps to reproduce
When using the openapi generator gradle plugin:
./gradlew build
Related issues/PRs
https://github.com/OpenAPITools/openapi-generator/pull/18332