【发布时间】:2021-04-14 17:22:42
【问题描述】:
我有一个休息端点,它使用一个类作为 openapi 架构:
import javax.ws.rs.Path;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
import org.eclipse.microprofile.openapi.annotations.responses.APIResponse;
@Path("/orders")
@RequestScoped
public class OrdersRest {
@APIResponse(responseCode = "200", description = "Create a new order", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = OrderDto.class)) })
public Response create(OrderDto request) throws SessionNotFound {
OrderDto 类有一个属性引用了我的项目中存在的另一个类:
public class SessionDto {
private SessionSettingsProperties[] sessionSettingsProperties;
当我访问 swagger-ui 时,我收到错误消息:
Errors
Resolver error at paths./session.get.responses.200.content.application/json.schema.properties.sessionSettingsProperties.items.$ref
Could not resolve reference: Could not resolve pointer: /components/schemas/SessionSettingsProperties does not exist in document
我使用的是 Quarkus 1.13.1.Final 版本。
我发现这个issue in Quarkus project 看起来很相似,但我相信这与我遇到的问题不完全相同。
【问题讨论】:
标签: swagger-ui openapi quarkus