OpenAPITools / OpenAPITools/openapi-generator

[Spring] [Reactive] Controller parameters wrapped in Mono

Open
#4,273 7 comments 16 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

A generated controller method for Webflux (spring, reactive) look like this:

public Mono<ResponseEntity<MyModel>> createModel(
    @Valid @RequestBody Mono<MyCreateModel> myCreateModel,
        ServerWebExchange exchange) throws Exception { ...

Q1: Why is myCreateModel parameter wrapped with a Mono?

Q2: Do I need ServerWebExchange param? If not, can I disable the generation?

Thx

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the generated Spring WebFlux controller method and how its reactive parameters are selected. Determine whether the Mono and ServerWebExchange parameters are intentional and whether generation can be configured; done should mean a documented answer or a clearly scoped configuration change, with coverage for the resulting controller signature.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.