0

I see a lot of images like this with version switch in dropdown. Apparently this thing should show only the routes of requested version (we can only see V1 routes on the screenshot but if we switch to V2 in dropdown - we'll see routes only for V2).

enter image description here

Is this "Select a definition" feature part of OpenAPI specification or some tweaked Swagger UI implementations? How could i do something like this in Swagger Editor? I can't find docs or examples in yaml about it.

DenisNovac
  • 621
  • 2
  • 8
  • 15
  • Does this answer your question - [Swagger UI with multiple URLs](https://stackoverflow.com/a/44819386/113116)? – Helen May 23 '23 at 15:02
  • Well i see people do it here and there but it's never a yaml (answer from your link looks like JavaScript) so i don't understand how to implement this in Swagger Editor. That's the main reason i asked a question. – DenisNovac May 23 '23 at 15:06
  • I want to make a feature request to one of libs for swagger generation but i don't understand what is this thing - tweaked Swagger UI or part of the standard – DenisNovac May 23 '23 at 15:08
  • 1
    It's a Swagger UI feature/option. OpenAPI Specification has a similar (but not quite the same) concept where you can define [multiple API servers](https://stackoverflow.com/a/40599463/113116) within the same API definition. – Helen May 23 '23 at 17:25

0 Answers0