postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.81k stars 839 forks source link

Postman VS Code extension should allow import/export to OpenAPI and Postman JSON #11728

Open codemaestro opened 1 year ago

codemaestro commented 1 year ago

Is there an existing request for this feature?

Is your feature request related to a problem?

This is a feature request against the preliminary implementation announced in a recent email and by an issue logged Apr 2021: #9890

Describe the solution you'd like

Based on the screenshot of the the proposed VS Code extension, the extension is expected to provide a Postman client/interface within VS Code, which would be really useful. We use the Postman desktop/web client heavily to organize the structure of our collections for use with our API documentation. Our documentation is stored in separate text files on the local machine, and a CI/CD process merges the collection JSON file with the text files.

We would need to export different versions of the collection:

  1. The collection as is. One of our issues is that our writers sometimes forget to export the latest copy of the collection before pushing a merge request back to our repo. The VS Code extension would make it easier to remember to download the latest copy of the collection before merge. It might even help to include the download as a pre-commit hook.

  2. A copy of the collection piped through our merge script. We would write a custom script that extracts the portion of our CI/CD pipeline that merges the collection with the local files, and export the Postman JSON with the documentation intact.

  3. A copy of the collection in (2) above piped to an OpenAPI specification. We would write a script template that contains the OpenAPI structure we would then use for integrating into other tools.

  4. Items (2) and (3) suggest that the export routine be customizable.

Describe alternatives you've considered

Our existing workflow already performs some elements of this in our CI/CD pipeline. It's just that exporting the collection is always a manual step before pushing to our release branch.

Additional context

No response

preethammavin commented 1 year ago

@codemaestro Looks like an interesting workflow, curious to know where the documentation powered by Postman collection is published. Even with your current workflow, you should be able to automate most things with Postman Workspaces, Postman Public API, and Version Control in Postman.

Would be great if we can get on a call to understand your workflow better. Here's my calendly link, if these time slots dont workdo drop me an email at preetham@postman.com so we can set some time up

codemaestro commented 1 year ago

Hi @preethammavin! I CC:ed you on an open ticket with your support team to track additional feedback outside of GitHub. I'll coordinate a meeting, thanks.

thena-seer-sfg commented 11 months ago

Yes, we commit exported Postman collection JSON files to our repo, and it would be nice to be able to import them easily into the extension from files in the workspace, and re-export after making changes, or even better be able to live-edit files using the postman interface. The curl feature doesn't seem to support file:// protocol.

mees-van-wel commented 9 months ago

This would indeed be a great feature!

jayendra-ram commented 8 months ago

i need this so much

paulrwest commented 8 months ago

We need this too, we have a team working on postman collections as a team under version control live-edit would be the ideal solution import export to file second best.

pankajk07 commented 8 months ago

Hey all, we have added the support to import Postman Collections and Environments into the extension. This feature is available as part of the latest update.

The following video shows how we can import a collection inside the extension.

https://github.com/postmanlabs/postman-app-support/assets/44100113/1f5b428d-96db-42ee-911e-563789d0b521

slukashuk commented 5 months ago

So for now only importing of collection available? I can't find how can I export my collection

slukashuk commented 5 months ago

And during importing a collection if duplicate found - there is no option to replace the file, only importing as a copy or cancel image Replace option can make usage of the extension much easier image

vanjis commented 5 months ago

Looking for an export collection feature.

tony-ross commented 4 months ago

export collection is a must - our wow needs this feature.

daniavander commented 2 months ago

Can anybody import json collection? I get only a loading animation

indraneel-postman commented 2 months ago

@daniavander Can you share some more details on what issue you are facing when importing a collection? The below information would be helpful:

Would request you to create a new issue for this if you are consistently facing it while importing files.

tmolumby commented 2 weeks ago

I looks like there is a workaround for exporting the JSON of a collection in the VSCode extension:

  1. Go to https://web.postman.co
  2. Go to your profile
  3. Goto collections
  4. Now you have the much more robust web interface and you can now right click on the collection and export

Would be nice if this functionality was in the extension.