Closed
Description
I use spring boot 2.2.6, springdoc 1.3.1.
For example there is an endpoint:
@PutMapping(Routes.CMS.Internal.CONTENT)
public ActionResult<Void> update(@Validated @RequestBody UpdateContentRequest request) {
this.contentService.update(request);
return ActionResult.ok();
}
For any response i has wrapper ActionResult
:
public class ActionResult<T> {
protected T value;
protected boolean success;
protected ServiceEnum service;
protected String errorCode;
protected String message;
protected Object errorValue;
protected String targetUrl;
}
and if I specify the generic Void
type, swagger generates response without schema:
"responses": {
"200": {
"description": "default response"
}
}
but with ?
type or without specify generic type:
"responses": {
"200": {
"description": "default response",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/ActionResult"
}
}
}
}
}
With springfox i had no problems, an ActionResultVoid
scheme was generated, but it is simply empty here.
As I understand the problem is here
Why are Void
types excluded here?