问题:postman在导入json脚本时,提示如下错入
1 invalid import format(s)
Postman Collection Format v1 is no longer supported and can not be imported directly. You may convert your collection to Format v2 and try importing again.
报错原因:json文件从别的postman导出时是V1版本,现在postman工具已经不支持jsonV1版本文件的导入,需要转换成V2版本
解决办法:
#json文件版本转换工具
npm install -g postman-collection-transformer
#文件转换命令
postman-collection-transformer convert -i <path to input Postman collection file> -o <path where the output Postman file will be downloaded> -j 1.0.0 -p 2.0.0 -P
安装可能会遇到的问题:
配置环境变量即可
操作实践
C:\Users\601267>postman-collection-transformer convert -i "E:\123.json" -o "E:\12345.json" -j 1.0.0 -p 2.0.0 -P