-
-
Notifications
You must be signed in to change notification settings - Fork 544
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Hi,
this might be a bug or new feature request but for
@PostMapping(value = "/tweets/does-not-work", consumes = MediaType.APPLICATION_JSON_VALUE)
public Mono<Tweet> postNotWorks(@RequestBody Mono<Tweet> tweet) {
return tweet;
}
returns a blank schema in swagger
As a work around I can do
@PostMapping(value = "/tweets/work-around", consumes = MediaType.APPLICATION_JSON_VALUE)
public Mono<Tweet> postNotWorkAround(
@RequestBody @io.swagger.v3.oas.annotations.parameters.RequestBody(content = @Content(schema = @Schema(implementation = Tweet.class))) Mono<Tweet> tweet) {
return tweet;
}
but it would be great if the default behaviour was to unpack the POST body Mono or Flux and use the type as the schema just as you are doing on return Monos or Fluxs.
Is this possible?
Thanks
P.S. https://github.com/davidmelia/springdoc-webflux contains an example where "/tweets/does-not-work" shows the blank schema problem.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request