Switch API versions in Swagger UI?

Hello everyone :slight_smile: . 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?

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.

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

1 Like

Made an issue: [Feature] Switch API versions in Swagger UI · Issue #2912 · softwaremill/tapir · GitHub