You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it's possible to hack into "swagger-editor" to import a file (and its dependencies) from FileSystem API, them save it to the same API.
If you look at topbar.jsx#L64 'll notice that it only calls this.props.specActions.updateSpec(YAML.safeDump(YAML.safeLoad(textFromFileLoaded))) with textFromFileLoaded from the (obviously) loaded file.
If you add a menu bar and implement an Electron's load file dialog and feed the editor with this data, it should be nicely integrated with local FS, then a simple "Save" action could overwrite the file and (maybe) some fsnotifier could sync the editor when some external editor changes the same content.
The text was updated successfully, but these errors were encountered:
So far these (mostly) mimic the ones available in the browser window. The exception being I rolled up the "convert to" logic into a choice of format in the Save As dialog.
So no "Save" option yet. And no monitoring the filesystem.
I'll work on "Save" next
I think it's possible to hack into "swagger-editor" to import a file (and its dependencies) from FileSystem API, them save it to the same API.
If you look at topbar.jsx#L64 'll notice that it only calls
this.props.specActions.updateSpec(YAML.safeDump(YAML.safeLoad(textFromFileLoaded)))
withtextFromFileLoaded
from the (obviously) loaded file.If you add a menu bar and implement an Electron's load file dialog and feed the editor with this data, it should be nicely integrated with local FS, then a simple "Save" action could overwrite the file and (maybe) some fsnotifier could sync the editor when some external editor changes the same content.
The text was updated successfully, but these errors were encountered: