我正在将一个 swagger 规范文件导入邮递员以创建一个集合,此时,按预期工作,并且该集合是由所有请求和生成的.子文件夹,很好!!但是当 api 更新时,我需要更新邮递员以根据新规范更新所有请求.我找不到更新"之类的操作或其他操作.我正在尝试将新规范导入邮递员,他说:
I'm importing a swagger specification file into postman to create a collection, at this point, works as expected and the collection is generated with all requests & sub-folders, fine!!. But when the api is updated, I need update the postman to update all requests based on the new specification. I can't find a action like "update" or something else. I'm trying import the new specification into postman and he say:
集合 APIName 已存在.你想做什么?
A collection APIName already exists. What would you like to do?
替换或导入为副本
复制它是一个不可行的选项,然后我使用 replace 并更新现有集合,但所有测试、参数、pre-req 脚本都被删除,我需要重新配置所有.
a copy its a not feasible option, then I use replace and the existent collection is updated, but all tests, parameters, pre-req scripts are remove and I need reconfigure all again.
我遗漏了一些东西,存在一种导入 &从规范文件更新现有集合,而不会丢失现有测试和配置?
I'm missing something, exist a way to import & update a existent collection from a specification file, without losing existent tests & configuration?
提前致谢!
推荐答案Postman 目前不支持此功能.链接
Postman does not support this as of now. Link
我从这个博客中学到了另一种选择.简而言之:
Alternative I learned from this blog. In short:
Postman 更新集合 API 正文示例:
Postman update collection API body sample:
{ "collection": <------- YOUR EXPORTED COLLECTION HERE ---------> }更多推荐
从 swagger 规范文件更新邮递员集合
发布评论