[PR #3049] [CLOSED] Postman 2.1 export #4203

Closed
opened 2026-03-17 01:45:38 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/3049
Author: @jfbloom22
Created: 5/10/2023
Status: Closed

Base: mainHead: postman-21-export


📝 Commits (7)

  • db88c42 feat: postman 2.1 export
  • 0091e00 Merge branch 'main' of github.com:aitchnyu/hoppscotch into postman-21-export
  • 51fc7da feat: allow exporting teams collection too
  • 51c7870 chore: merge
  • 73b9074 refactor: from pr comments
  • c2d4f07 Merge github.com:hoppscotch/hoppscotch into postman-21-export
  • b75896b fix: issues with parsing hopscotch urls. Successfully exporting and importing into Postman

📊 Changes

7 files changed (+17048 additions, -12721 deletions)

View changed files

📝 packages/hoppscotch-common/locales/en.json (+1 -0)
📝 packages/hoppscotch-common/src/components/collections/Collection.vue (+15 -0)
📝 packages/hoppscotch-common/src/components/collections/MyCollections.vue (+8 -0)
📝 packages/hoppscotch-common/src/components/collections/TeamCollections.vue (+6 -0)
📝 packages/hoppscotch-common/src/components/collections/index.vue (+28 -1)
packages/hoppscotch-common/src/helpers/import-export/export/postman.ts (+193 -0)
📝 pnpm-lock.yaml (+16797 -12720)

📄 Description

Continues the work on: https://github.com/hoppscotch/hoppscotch/pull/2931

Closes https://github.com/hoppscotch/hoppscotch/issues/2693

Description

@aitchnyu created a function for converting Hoppscotch collections to Postman 2.1.

I continued the work by merging in the latest upstream changes and fixing some issues where the export function was failing to export my 80 request Hoppscotch collection.

[x] In My Workspace Collections, add an Export to Postman Collection option to the popup menu for a collection.

Screen Shot 2023-05-06 at 12 24 41 PM

[x] Export a Postman 2.1 collection that will import into Postman successfully.

[ ] Implement it for teams collection
It should work with teams collections. The shape of MyCollection and TeamCollection are different enough and may need some duplicated code.

[ ] Make it work for sub collections
A folder should also be exported as a collection. This is not working due to weird logic for passing collection to the export function.

[ ] Make it work for global export menu
We need to recursively parse all collections and export as a giant collection.

[ ] Should it export the tests? The postman API is different, so they will not work without changes, but it might be nice to at least have a starting point. There are some similar API so some simple find and replace might get it partially there. For instance, it can replace "pw." with "pm.".

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

Additional Information

One test failed, but it is also failing for me on main branch.

 FAIL src/auth/auth.service.spec.ts (9.072 s)
│   ● verifyMagicLinkTokens › Should throw MAGIC_LINK_EXPIRED if passwordless token is expired
│     TypeError: Cannot read properties of undefined (reading '_tag')

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/3049 **Author:** [@jfbloom22](https://github.com/jfbloom22) **Created:** 5/10/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `postman-21-export` --- ### 📝 Commits (7) - [`db88c42`](https://github.com/hoppscotch/hoppscotch/commit/db88c426be23a574118a828b6ddb58a534c80a1c) feat: postman 2.1 export - [`0091e00`](https://github.com/hoppscotch/hoppscotch/commit/0091e001d76c4e601273416b884d9978b6ddcd78) Merge branch 'main' of github.com:aitchnyu/hoppscotch into postman-21-export - [`51fc7da`](https://github.com/hoppscotch/hoppscotch/commit/51fc7dab97cafb949da13e10150e3939461b7fff) feat: allow exporting teams collection too - [`51c7870`](https://github.com/hoppscotch/hoppscotch/commit/51c78701d4a98b0a850c912c0c7796721309f99e) chore: merge - [`73b9074`](https://github.com/hoppscotch/hoppscotch/commit/73b90749b269b18fe636a51c1eb61acbb14a7057) refactor: from pr comments - [`c2d4f07`](https://github.com/hoppscotch/hoppscotch/commit/c2d4f077db2c7aec53789a32e897972483f2b76a) Merge github.com:hoppscotch/hoppscotch into postman-21-export - [`b75896b`](https://github.com/hoppscotch/hoppscotch/commit/b75896b7d93a5c83bbe3273730fa24dc5ad0cdd6) fix: issues with parsing hopscotch urls. Successfully exporting and importing into Postman ### 📊 Changes **7 files changed** (+17048 additions, -12721 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/locales/en.json` (+1 -0) 📝 `packages/hoppscotch-common/src/components/collections/Collection.vue` (+15 -0) 📝 `packages/hoppscotch-common/src/components/collections/MyCollections.vue` (+8 -0) 📝 `packages/hoppscotch-common/src/components/collections/TeamCollections.vue` (+6 -0) 📝 `packages/hoppscotch-common/src/components/collections/index.vue` (+28 -1) ➕ `packages/hoppscotch-common/src/helpers/import-export/export/postman.ts` (+193 -0) 📝 `pnpm-lock.yaml` (+16797 -12720) </details> ### 📄 Description Continues the work on: https://github.com/hoppscotch/hoppscotch/pull/2931 Closes https://github.com/hoppscotch/hoppscotch/issues/2693 Description @aitchnyu created a function for converting Hoppscotch collections to Postman 2.1. I continued the work by merging in the latest upstream changes and fixing some issues where the export function was failing to export my 80 request Hoppscotch collection. [x] In My Workspace Collections, add an Export to Postman Collection option to the popup menu for a collection. <img width="512" alt="Screen Shot 2023-05-06 at 12 24 41 PM" src="https://github.com/hoppscotch/hoppscotch/assets/5193247/2525cd7a-15b3-4911-8f86-1228681de33e"> [x] Export a Postman 2.1 collection that will import into Postman successfully. [ ] Implement it for teams collection It should work with teams collections. The shape of MyCollection and TeamCollection are different enough and may need some duplicated code. [ ] Make it work for sub collections A folder should also be exported as a collection. This is not working due to weird logic for passing collection to the export function. [ ] Make it work for global export menu We need to recursively parse all collections and export as a giant collection. [ ] Should it export the tests? The postman API is different, so they will not work without changes, but it might be nice to at least have a starting point. There are some similar API so some simple find and replace might get it partially there. For instance, it can replace "pw." with "pm.". ### Checks <!-- Make sure your pull request passes the CI checks and do check the following fields as needed - --> - [x] My pull request adheres to the code style of this project - [ ] My code requires changes to the documentation - [ ] I have updated the documentation as required - [ ] All the tests have passed ### Additional Information One test failed, but it is also failing for me on main branch. ``` FAIL src/auth/auth.service.spec.ts (9.072 s) │ ● verifyMagicLinkTokens › Should throw MAGIC_LINK_EXPIRED if passwordless token is expired │ TypeError: Cannot read properties of undefined (reading '_tag') ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 01:45:38 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4203
No description provided.