Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #9774
Closed
Open
Issue created Jun 15, 2021 by Administrator@rootContributor

[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

Assignee
Assign to
Time tracking