简体   繁体   中英

Swagger-ui anchor link to model definitions

Is it possible to access a model definition of via swagger-ui directly via an anchor?

In the example page http://petstore.swagger.io/ I see that the anchor works for a groups of endpoints, eg http://petstore.swagger.io/#/pet .

Hovering the mouse over a model description shows me an anchor (eg #/definitions/Category for the Category model), but http://petstore.swagger.io/#/definitions/Category does not bring me there.

If I inspect the elements, I see a real link to anchor pet :

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

while for Category this is a model-hint :

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

So I wonder if anchoring models is supported at all..

Swagger UI does not support permalinks for schemas/models. There's an existing feature request:
https://github.com/swagger-api/swagger-ui/issues/1369

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM