OpenAPITools / OpenAPITools/openapi-generator
[Spring] [Reactive] Controller parameters wrapped in Mono
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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