How To Set Up Swagger UI editor Locally in Windows
Jithin Somaraj
Senior QA Engineer | Specializing in Automation & Manual Testing | API Testing | Performance Testing | Expert in Enhancing Software Quality & Reliability
This was one I have searched a lot more but couldn't find a simple answer fortunately I had time to find it out so that I can Managed to do it properly. So that I thought sharing this information would be helpful for someone else.
For Setting up the Swagger Editor in your machine locally you need to make sure that the Nodejs is installed in your device. If it is not then install the nodejs first. Also you can check it by passing "npm --version" in cmd.
First you need to do after ensuring the nodejs is google "swagger api github" And click on the first Link from the Github.
After that open the Swagger-editor link from the menu items
After that you can see a download link for the latest version of the editor and you have to click on that.
Now you can download the editor by click on the "Source code.(zip)"
领英推荐
After downloading the zip file extract the file to a single folder.
After that Open Command prompt, you need to activate the npm server for that call "npm install -g http-server" .After it completed then move to the swagger-editor folder in cmd(eg: "cd C:\Users\user\Desktop\Swagger\swagger-editor").After that Type "npm install" and tap enter.
After the installation completed you have to move the folder location to swagger by entering "cd.." and then you need to setup the localhost for that you have to input "http-server swagger-editor -a 127.0.0.1 -p 8080" and tap enter. And here you can choose any port over '8080' . After the execution you can get a success response like the image showing below
After that open your browser and go to ''localhost:8080'' and you can see the Swagger editor and you can perform any swagger operations
........................................................THE END......................................................................
Student at Sipna college of engineering and technology
1 年and the npm install command is also showing many errors
Student at Sipna college of engineering and technology
1 年sir my localhost is showing error