Swagger-ui链接到模型定义

时间:2017-10-19 10:06:43

标签: javascript anchor swagger swagger-ui

是否可以通过锚点直接访问via swagger-ui的模型定义?

在示例页面http://petstore.swagger.io/中,我看到锚点适用于一组端点,例如 http://petstore.swagger.io/#/pet

将鼠标悬停在模型描述上会显示一个锚点(例如#/definitions/Category模型的Category),但是 http://petstore.swagger.io/#/definitions/Category并未将我带到那里。

如果我检查元素,我会看到锚点pet的真实链接:

<a class="nostyle" href="#/pet"><span>pet</span></a>

而对于Category,这是模型提示

<span class="model-hint">#/definitions/Category</span>

所以我想知道是否支持锚定模型..

1 个答案:

答案 0 :(得分:0)

Swagger UI不支持架构/模型的永久链接。现有功能请求:
https://github.com/swagger-api/swagger-ui/issues/1369

相关问题