Search code examples
urlswagger-ui

Is it possible to save the swagger url in a browser bookmark


I am using swagger-ui and have different servers/interfaces/. So for each of them I store a bookmark - but the URL used in the swagger-ui is never ever saved within the bookmark. I always have to type in the address again.

Is it possible to save the URL used in the swagger-ui in a browser bookmark (for example as a special parameter)?


Solution

  • If your swagger-ui is running here:

    file:///Users/me/work/swagger-ui/dist/index.html
    

    And your server is running here:

    http://localhost:8080/api-docs
    

    Then you can bookmark the swagger-ui for your server like so (a simple GET with a param named "url"):

    file:///Users/me/work/swagger-ui/dist/index.html?url=http://localhost:8080/api-docs