[REQ][Java][Spring] Allow Spring generated code to use new OAS 3 annotations
Created by: welshm
Description
The current generation of Spring generates annotations using io.swagger.annotations.*
New versions of Spring and Swagger can use io.swagger.v3.oas.annotations.*
openapi-generator version
5.2.0
Command line used for generation
java -jar ./openapi-generator-cli.jar generate -g spring -o generated_new -i ./openapi-specifications/client-user-manager/clientusermanager_openapi.yaml -c ./openapi-spring-config.yaml
dateLibrary: java8
library: spring-boot
serializableModel: true
hideGenerationTimestamp: true
modelNameSuffix: DTO
useOneOfInterfaces: true
addOneOfInterfaceImports: true
useTags: true
basePackage: co.ritual.clientusermanager
apiPackage: co.ritual.clientusermanager.generated.api
invokerPackage: co.ritual.clientusermanager.generated.api
modelPackage: co.ritual.clientusermanager.generated.models
configPackage: co.ritual.clientusermanager.generated.configuration
Steps to reproduce
Run the generator
Related issues/PRs
https://github.com/OpenAPITools/openapi-generator/issues/9604 - Uses Springfox annotations
Suggest a fix/enhancement
Add in options to use OAS3 annotations / imports as well as allowing the API to be marked as a @Controller
Explicitly allow setting Springfox to be disabled
Proposed fix: https://github.com/OpenAPITools/openapi-generator/pull/9775