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
  • #1309
Closed
Open
Issue created Oct 24, 2018 by Administrator@rootContributor

Allow generation of reactive APIs w/o wrapping Mono<ResponseEntity>

Created by: jrobison153

Description

We've been looking at the generated Spring Web Reactive interfaces and the response type wrappings seem superfluous, this is using version openapi-generator:3.3.1. For an API that returns a collection of type T, we get a Java interface with the following response signature

Mono<ResponseEntity<Flux<T>>>

From all of our testing this behaves identically to Flux<T> from a reactive client's perspective. The additional Mono<ResponseEntity> adds additional code to each controller to add the type wrappings.

Since the ServerWebExchange is already present and gives all the control over the HTTP session needed. It seems the generated code could be simplified

The suggestion is that an option could be added to generate the reactive interfaces w/o the wrapping Mono<ResponseEntity>

openapi-generator version

openapi-generator:3.3.1

Related issues/PRs

https://github.com/OpenAPITools/openapi-generator/pull/571

Assignee
Assign to
Time tracking