Forum Discussion

Dimkanp's avatar
Dimkanp
New Contributor
4 years ago

Linking to custom documentation file

Hello! I'm looking for answer for my problem: how to link to documentation from custom file? I run the swagger ui docker instance using this command 'docker run -p 80:8080 -e SWAGGER_JSON=/foo/swagg...
  • Dimkanp's avatar
    4 years ago

    Solution:
    Using URLS environment variable gives opportunity to chose documentation file from drop down menu on the site and path to the request changed.


    Env variable passed to docker:
    URLS=[{url:'./swagger.json',name:'stable'},{url:'./develop.json',name:'develop'}]

     

    Url to the request defined in non default documentation file:
    ip:port/?urls.primaryName=develop#/users/search

    Documentation: Swagger Documentation