Swagger @ApiModel注释不会为反应堆类型(如Mono或Flux)生成api文档。当我的控制器希望在保存方法中输入Mono时
当我使用Contact联系人而不是Mono contact时,一切正常。
@PostMapping("/save")
@ApiOperation(value = "Save new contact or update existing contact")
public Mono<Object> save(@ApiParam(value = "Contact to be saved") @RequestBody Mono<Contact> contact, @AuthenticationPrincipal Principal principal) {
return contactService.save(principal, contact);
}
@Data
@Document
@NoArgsConstructor
@ApiModel(value = "Contact api description")
public class Contact {
@Id
@ApiModelProperty(value = "Id of contact")
private String id;
}