我可以获得openapi3操作模型as described in the documentation,但我希望获得引用的模式属性。
例如,我的yaml中有"post- example“操作:
/post-example:
post:
summary: Example for all the possible 200 query responses
operationId: post-example
tags:
- read
requestBody:
required: true
content:
"application/json":
schema:
$ref: "#/components/schemas/example-query"
responses:
200:
description: Expected response to a valid request
我想要获取"example-query“模式属性。
在vertx 4.0.0中这是可能的吗?
发布于 2021-01-27 22:44:22
使用RouterBuilder#getOpenAPI()
,您可以获得OpenAPIHolder
,它允许您使用JsonPointer
访问OpenAPI文档的任何组件
OpenAPIHolder holder = routerBuilder.getOpenAPI();
Object schema = holder.getCached(
JsonPointer.from("#/components/schemas/example-query")
);
https://stackoverflow.com/questions/65819557
复制相似问题