How to open local files in Swagger-UI

前端 未结 13 1659
粉色の甜心
粉色の甜心 2020-12-23 09:10

I\'m trying to open my self generated swagger specification file my.json with swagger-ui on my local computer.

So I downloaded the latest tag v2.1.8-M1

13条回答
  •  情歌与酒
    2020-12-23 10:04

    This is how I worked with local swagger JSON

    1. Have tomcat running in local machine
    2. Download Swagger UI application and unzip it into tomcat's /webapps/swagger folder
    3. Drop local swagger json file inside /webapps/swagger folder of tomcat
    4. Start up tomcat (/bin/sh startup.sh)
    5. Open a browser and navigate to http://localhost:8080/swagger/
    6. type your swagger json file in the Swagger Explore test box and this should render the APIs.

    Hope this works for you

提交回复
热议问题