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
  • #6135
Closed
Open
Issue created May 01, 2020 by Administrator@rootContributor

Change return types for Spring openapi-generator-maven-plugin generated interfaces

Created by: fearlessfara

I've managed to generate the interfaces from a .yaml open-api descriptor file, but, as in the question title, I'd love to change the response type of those interfaces from ResponseEntity to my own types. Basically instead of the interface having this signature: ResponseEntity<Void> clearCache(); for a method that is implemented basically this way: public void clearCache(){ //do something} I'd want the generated interface to be as simply as void clearCache(); Same thing for my own defined classes, instead of ResponseEntity<MyBook> getBook(String ISBN); I want it to just use MyBook as return type, so it should look something like MyBook getBook(String ISBN);

I think this could be a really useful feature for the future of this openapi-generator plugin, currently I haven't managed to get it do what I'm looking for but I think here on the community with this issue (which was suggested me to create it by @wing328 ) I'll find a solution to it!

Assignee
Assign to
Time tracking