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've been using the Swagger UI tool, but I was missing a "Refresh" button, to refresh the URL that once was used to fetch the OpenAPI spec. Instead, I had to go to "Import URL" and add the URL every time I made a change to the spec in the backend code.
I did try to see if a page refresh (F5) had any effect, but it didnt. So, I cloned the repo, and made some small changes for me to run locally. I was considering a PR for this, but I read this, and here is the issue first for ppl to comment on =)
Changes I made locally, that I can make into a PR if ppl want it:
Added a menu alternative "Refresh":
Pressing this button, will re-download the specification from a url previously entered
topbar.jsx: added the refreshURL function, that looks in window.localstorage for the 'url' and refreshes it if it is found. If there is no cached URL, it will call the importFromURL instead, opening up the popup to enter URL
topbar.jsx:: added code to importFromURL so that the URL is cached in window.localstorage
Modified the logic for Clear editor in function clearEditor to also remove the url from localStorage
added toasts for both Refresh and the Import from URL options
I am not a web dev or react dev, so I was unsure where to place the toast lib js file. Currently, it is inside the /dist folder, so the index.html is modified like this:
I've been using the Swagger UI tool, but I was missing a "Refresh" button, to refresh the URL that once was used to fetch the OpenAPI spec. Instead, I had to go to "Import URL" and add the URL every time I made a change to the spec in the backend code.
I did try to see if a page refresh (F5) had any effect, but it didnt. So, I cloned the repo, and made some small changes for me to run locally. I was considering a PR for this, but I read this, and here is the issue first for ppl to comment on =)
Changes I made locally, that I can make into a PR if ppl want it:
Pressing this button, will re-download the specification from a url previously entered
refreshURL
function, that looks in window.localstorage for the 'url' and refreshes it if it is found. If there is no cached URL, it will call theimportFromURL
instead, opening up the popup to enter URLimportFromURL
so that the URL is cached in window.localstorageClear editor
in functionclearEditor
to also remove theurl
from localStorageRefresh
and theImport from URL
optionsI am not a web dev or react dev, so I was unsure where to place the toast lib js file. Currently, it is inside the
/dist
folder, so the index.html is modified like this:Please let me know if I should make a PR out of this, or not =)
The text was updated successfully, but these errors were encountered: