如果用户通用,我会得到无效的请求示例和架构,但我得到有效的响应类型。
我怎样才能得到正确的看法?
@RestController
public abstract class BaseController<D extends BaseObject> {
@PostMapping
@Operation(summary = "create")
public ResponseEntity<D> create(@RequestBody Wrapper<D> payload) {
return ResponseEntity.ok(payload.getPayload());
}
}
@RestController
@Tag(name = "example")
public class FirstController extends BaseController<CustomerDto> {
}
附言。无效请求示例是仅具有来自父类/接口的字段的对象 - BaseObject
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-webmvc-core</artifactId>
<version>1.3.9</version>
</dependency>