Open thim81 opened 2 years ago
@thim81 that would be a great for customers who use generated postman collection from the spec 🙏
hi @BenjaminDC
I'm curious about what you interpret this feature and what would you expect as a result? Would you mind sharing your use-case/experience.
Basically, what I expect is the ability to specify an example reference in the variation Tests and then having one postman request per variation. if the example reference is not specified, then we could fallback to the first one.
proposal :
{
"openApiOperationIds": [
"post-push-send"
],
"exampleReference": "#/components/examples/sample-send-push-google", <---
"overwriteRequestBody": [
{
"key": "[0].content.expiration",
"value": "{{expiration_date_future}}",
"overwrite": true
},
{
"key": "[0].context.profile",
"value": "automation_profile",
"overwrite": true
},
{
"key": "[0].reference",
"value": "newman{{$guid}}",
"overwrite": true
}
]
}
@BenjaminDC This is a good proposal, we might tweak it a bit with regards to the setting name.
We are working on adding some support for overwriting "form-data" & "x-www-form-urlencoded" request bodies. We will try to find some time after that to work on this.
Currently Portman generates a variation where the 1 example is used as request body in the generated request.
In case there are multiple examples, Portman could generate a variation per example: