# Switch API versions in Swagger UI?

**URL:** <https://softwaremill.community/t/switch-api-versions-in-swagger-ui/210>\
**Category:** tapir\
**Created:** [May 23, 2023, 12:14pm UTC](https://softwaremill.community/t/switch-api-versions-in-swagger-ui/210 "2023-05-23T12:14:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Denis\_N](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@Denis\_N](https://softwaremill.community/u/Denis_N)\
**Post date:** [May 23, 2023, 12:14pm UTC](https://softwaremill.community/t/switch-api-versions-in-swagger-ui/210/1 "2023-05-23T12:14:07Z")

</div>

Hello everyone 🙂 . Is it possible to generate Swagger UI with versions switch like on pic in Tapir? So i could get rid of `/api/v1/docs` and have one swagger route for multiple versions without versions mess in definitions?

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/softwaremill/original/1X/7211bbf64de9d2bdcfdb011c2589518ab588a0fb.png)

My endpoints contain version inside the path like on screen: `/api/v1/user` if this is important and currently i just provide two separate swaggers.

---

<div class="post-metadata">

**Author:** ![adamw](https://dub1.discourse-cdn.com/flex005/user_avatar/softwaremill.community/adamw/32/28_2.png) [@adamw](https://softwaremill.community/u/adamw)\
**Post date:** [May 23, 2023, 2:36pm UTC](https://softwaremill.community/t/switch-api-versions-in-swagger-ui/210/2 "2023-05-23T14:36:03Z")

</div>

This is not possible right now, as far as I am aware. Though it could be possibly implemented, but would require some further research:

- is this a feature of Swagger UI, or of the OpenAPI spec?
- where is the list of versions defined?
- is this part of the doc’s yaml, or are multiple yamls provided?

So summing up, I think this would best be transformed into a feature request on [GitHub - softwaremill/tapir: Declarative, type-safe web endpoints library](https://github.com/softwaremill/tapir)

---

<div class="post-metadata">

**Author:** ![Denis\_N](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@Denis\_N](https://softwaremill.community/u/Denis_N)\
**Post date:** [May 23, 2023, 3:22pm UTC](https://softwaremill.community/t/switch-api-versions-in-swagger-ui/210/3 "2023-05-23T15:22:40Z")

</div>

Made an issue: [[Feature] Switch API versions in Swagger UI · Issue #2912 · softwaremill/tapir · GitHub](https://github.com/softwaremill/tapir/issues/2912)
