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
  • #8031
Closed
Open
Issue created Nov 26, 2020 by Administrator@rootContributor

[BUG][SPRING] Reactive paramter ServerWebExchange's properties appear in Swagger-UI

Created by: stephanpelikan

Description

Building a reactive Spring service adds an additional Java parameter ServerWebExchange exchange which brings a long list of additional input parameters in the Swagger-UI:

ServerWebExchange

Generation Details

pom.xml:

  <groupId>org.openapitools</groupId>
  <artifactId>openapi-generator-maven-plugin</artifactId>
  ...
  <executions>
    <execution>
    ...
    <configuration>
      <generatorName>spring</generatorName>
      ...
      <configOptions>
        ...
        <reactive>true</reactive>
        ...
      </configOptions>

Actual output:

default Mono<ResponseEntity<Void>> doSomething(
    @ApiParam(value = "" ,required=true )  @Valid @RequestBody Mono<Whatever> whatever,
    ServerWebExchange exchange) {

Expected output:

default Mono<ResponseEntity<Void>> doSomething(
    @ApiParam(value = "" ,required=true )  @Valid @RequestBody Mono<Whatever> whatever,
    @ApiIgnore ServerWebExchange exchange) {
Related issues/PRs

https://github.com/OpenAPITools/openapi-generator/issues/4273

openapi-generator version

4.3.1 and 5.0

Suggest a fix

Add annotation @ApiIgnore to the parameter.

Assignee
Assign to
Time tracking