Where is your work in the Swagger editor stored?
Hi all.
I have the Swagger editor downloaded on my local machine (Mac). If I open its index.html directly from Finder, it pulls up the Swagger editor and shows the last thing I was working on.
I want to continue my work from another computer on my LAN, so I fired up the Web server on the same Mac and set up a symlink to Swagger's index.html. When I access it from another computer (or from localhost/[my user ID]/[the link I set up], I just get the "pet store" example text.
Any idea how I can carry on working on the same project, from the local machine or over the network?
Thanks!
Hi stokestack,
Swagger Editor stores the file contents in the browser's localStorage. LocalStorage is isolated per URL origin, that's why you don't see the previous work when you run another editor instance at a different URL.
The easiest way to work on the same file from different computers is to upload the file to SwaggerHub and edit it there. SwaggerHub can sync files to a Git repo for additional version control and backup.
If you want to keep using a local Swagger Editor, you'll need to transfer your API definition file manually between the computers, e.g. save and load it from shared location such as a Git repo.