swagger-editor icon indicating copy to clipboard operation
swagger-editor copied to clipboard

editor.swagger.io critical issue - API content not being reloaded when entering swagger editor url with specific api query param

Open 8o8inCodes opened this issue 8 months ago • 4 comments

Q&A (please complete the following information)

  • OS: macOS
  • Browser: chrome, safari
  • Version: latest chrome
  • Method of installation: none
  • Swagger-Editor version: Not sure
  • Swagger/OpenAPI version: OpenAPI 3.0, doesn't really matter tho

Describe the bug you're encountering

When first entering the official editor swagger with provided url querystring that supposed to load our open api data, it loads fine. HOWEVER if you were to make changes in the editor, and then try to enter the same url again, it doesn't dispose the changes. As well if we update our API data, and you would enter the URL again, it wont update content. So users are stuck with the first loaded content until they manually reload it using File>Load URL.

To reproduce...

Steps to reproduce the behavior:

  1. Go to https://editor.swagger.io/?url=https://raw.githubusercontent.com/testimio/public-openapi/main/api.yaml
  2. Click on File>Load petstore {doesn't matter which one} or make changes to the yaml
  3. reenter the url
  4. The changes you made are still there. And clearing cookies, erasing data doesn't help either.

Expected behavior

Every time you enter editor swagger with the specified api url in the query string, the editor should reload the api content.

Additional context or thoughts

This is super urgent because our customers are stuck with the old api documentation.

8o8inCodes avatar May 13 '25 10:05 8o8inCodes

faced with the same issue: swagger editor url parameter doesn't not load spec from URL

OchirDarmaev avatar May 19 '25 18:05 OchirDarmaev

Same here! Using the url-query-paramter is not leading to the correct specification.

maxl2287 avatar May 20 '25 08:05 maxl2287

here is solution based on https://github.com/camaraproject/DeviceLocation/pull/327

update subdomain from editor to editor-next old https://editor.swagger.io/?url=https://raw.githubusercontent.com/testimio/public-openapi/main/api.yaml new https://editor-next.swagger.io/?url=https://raw.githubusercontent.com/testimio/public-openapi/main/api.yaml

OchirDarmaev avatar May 21 '25 20:05 OchirDarmaev

here is solution based on camaraproject/DeviceLocation#327

update subdomain from editor to editor-next old https://editor.swagger.io/?url=https://raw.githubusercontent.com/testimio/public-openapi/main/api.yaml new https://editor-next.swagger.io/?url=https://raw.githubusercontent.com/testimio/public-openapi/main/api.yaml

Yes we did this in DeviceLocation but either way there was no anouncement that editor.swagger.io is now "obsolate" and please go with "editor-next".

This old editor should work until there was something mentioned in the changelogs. If not, then this is a bug.

Plus the fact that the editor-next is still an alpha-version, I would be thankful of finding a fix for the editor.swagger.io

maxl2287 avatar May 21 '25 21:05 maxl2287