thunder-client-support icon indicating copy to clipboard operation
thunder-client-support copied to clipboard

Option to sync the collection downloaded from openapi Url

Open monim67 opened this issue 3 years ago • 8 comments

This issue is based on the discussions on #687

Our API developers provide swagger.json URL to ui team, the ui team imports the collection from that URL. As the API is under active development the swagger schema changes frequently which the API consumers needs to pull. They have to delete the collection, grab the URL from email, and download the collection.

Can we add a feature so that a user can click a button to download and replace the collection when the swagger schema changes? For example a button named "Re-Sync" or "Sync Again", can be a sub-menu item on the collection drop-down menu. This will erase any changes to the collection resources made by user, so may be a confirmation dialog should make user properly aware of the action.

monim67 avatar Aug 03 '22 10:08 monim67

Thanks @monim67 for creating the request, will add to roadmap

rangav avatar Aug 03 '22 11:08 rangav

One question - how will you test openapi spec collection

  • By creating tests or running the urls
  • what you need to re-create in the request after you sync from url again?

rangav avatar Aug 03 '22 11:08 rangav

We lose the tests now when we delete and recreate the collection, so we can't use the testing feature. API consumers only run the urls as a schema reference.

Retaining tests will be wonderful but I'm afraid it involves complex logic of comparing uri against uri's and won't be perfect. Is there any intuitive way to retain tests?

monim67 avatar Aug 03 '22 11:08 monim67

I think we should be able to retain tests easily, I will test and confirm when I am implementing this.

rangav avatar Aug 03 '22 12:08 rangav

FYI - We added a new Docs tab to Collection Settings in v1.18.0, might be useful to you to save your Open API Url and other info Screenshot 2022-08-12 at 08 14 27

rangav avatar Aug 12 '22 07:08 rangav

If we had a way to sync the OpenApi would be spectacular. It is not only the tests we lost. All payloads, queries parameters, etc are lost when I delete the collection to import it again.

OpenApi is a standard right now. If you are close to this will be in a good standing.

There are other things provided by the OpenApi spec and I don't see when I import:

  • Server URL - It could provide the options for baseUrl
  • The examples - Currently when I import if fills with random stuff. In the examples, It could pre-fill them instead of random.

I have Thunder Client, but with no use for me, unfortunately.

byjg avatar Apr 02 '23 16:04 byjg

Came to the repo to ask this exact thing. I'm standing up a new project template for some of our teams, and moving to trying to use VSCode for everything and away from Visual Studio, and I added Thunder Client hoping it would enhance the DX for the devs coming from VS who don't know what tools they need, but needing to re-import the API spec on every change in order to test their endpoint would be kind of a non-starter.

josh-hemphill avatar Apr 10 '23 18:04 josh-hemphill

This feature would be wonderful and would really make Thunder shine!

dahu33 avatar Dec 26 '23 05:12 dahu33