2.9.Node Swagger mock server
Last updated
Was this helpful?
Last updated
Was this helpful?
1.Swagger-ui
1.Introduction
2.Create a Swagger server by using express
1.Create folder for project
2.Modify app.js
3.Download swagger-ui, copy all files and folders from dist folder to public folder from project folder
4.Run node server and open browser, you can see the default data ()
5.Edit JSON file and Download JSON (uber.json)from
6.Copy JSON file to project folder and modify index.html
7.Restart Node.js and open localhost:3000, but it can not show response from server when you try to use API on the current panel.
swagger-ui just can provide ability to show API document, so you have to build and run a mock server .
2.mock server
1.Clone from respostory
2.Install dependencies