Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postman能否支持导出到自定义workspace? #283

Closed
gcdd1993 opened this issue Nov 9, 2020 · 7 comments
Closed

Postman能否支持导出到自定义workspace? #283

gcdd1993 opened this issue Nov 9, 2020 · 7 comments
Assignees
Labels
type: enhancement New feature or request

Comments

@gcdd1993
Copy link
Contributor

gcdd1993 commented Nov 9, 2020

需求

我在postman中有多个以项目名划分的workspace,希望导出到postman时,能够导出至指定的workspace

可行性分析

目前EasyYapi的导出到postman 使用的接口为https://api.getpostman.com/import/exported,只支持导出至默认的workspace。Postman Api中提供了以下几个接口,通过组合使用,或许能完成这个功能。

  • Create a Fork:https://api.getpostman.com/collections/fork/{{collection_uid}}?workspace={{workspace_id}}
  • Merge a Fork:https://api.getpostman.com/collections/merge
  • Delete Collection:https://api.getpostman.com/collections/{{collection_uid}}

可行步骤

1、导出至默认workspace
2、创建fork到目标workspace,{{collection_uid}}为刚创建的collection_uid
3、合并merge
4、删除最开始创建的默认workspace中的collection

@tangcent 您看下是否可行?

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label enhancement to this issue, with a confidence of 0.97. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@issue-label-bot issue-label-bot bot added the type: enhancement New feature or request label Nov 9, 2020
@tangcent
Copy link
Owner

tangcent commented Nov 9, 2020

see Create Collection
image


这个参数或许有用. 不过这里麻烦的是开发者获取workspace的id比较麻烦
所以这里可能需要弹出一个窗口选择目标workspace.
然后使用 Create Collection来完成api的导出.

@gcdd1993
Copy link
Contributor Author

一般来说,一个项目应该只会导出至同一个workspace,所以应该可以在配置界面添加本项目所属workspace的uid就可以了

@tangcent
Copy link
Owner

Good idea. 也许做成可填可下拉比较方便.

@tangcent tangcent added the status: work-in-progress Currently being worked on label Nov 10, 2020
@tangcent
Copy link
Owner

如果你有时间, 愿意尝试一下,我可以把这个issue assign给你,等你提交PR.

@gcdd1993
Copy link
Contributor Author

@tangcent 我周末研究一下,提个pr

MiZhuo pushed a commit to MiZhuo/easy-yapi that referenced this issue Nov 11, 2020
opti: support new rule `postman.prerequest`&`postman.test`
@stale
Copy link

stale bot commented Dec 1, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Dec 1, 2020
@stale stale bot closed this as completed Dec 6, 2020
@tangcent tangcent removed wontfix This will not be worked on status: work-in-progress Currently being worked on labels Nov 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants