Open proDOOMman opened 2 years ago
@proDOOMman, Question: Do you want to overwrite the "file" elements, with a custom "file": {"src": "files/MyFile.bin"}
OR do you expect this to be part of the conversion?
@proDOOMman Any feedback from you, that we can look into?
@thim81 , I need this functionality too. Can I just specify a specific file? Or make it part of the conversion?
For anyone that still needs this. I did the following: In the newman script:
globals:{
"values": [
{
"key": "filePathSystem",
"value": `${process.cwd().toString()}`,
"type": "text",
"enabled": true
}
]
}
Then in the prequest script:
filePathSystem = pm.globals.get('filePathSystem');
pm.request.body = {
mode: "file",
file: filePathSystem+"/PathFromRunFolderToFile/File.json"
}
If openApi schema has "binary" content (
"schema": {"type": "string","format": "binary"}
), it will be translated into postman collection with body:To send this file from newman, I should change collection to:
But I can't find any way to do this. "Globals -> portmanReplacement" can't help me with such replacement.