Closed YOU54F closed 1 year ago
@YOU54F thanks for report the issue,
This is a tricky one... the error is produced because the body in the response is undefined
, I'm not able to generate a postman collection file with an undefined body using postman app or online version... but as this is easy to fix I have just released a new version 2.7.2
solving this.
Best Regards.
Same error as https://github.com/joolfe/postman-to-openapi/issues/198 , if
body
field is missing in a response.See reproduction.
npx -y pmpact https://gist.githubusercontent.com/YOU54F/994b85ff830ed2f6f21057779c0a40f0/raw/41d3286503714bca5914df7da54a665c83a84c60/pact.json > postman-collection.json && npx -y p2o postman-collection.json
modifying the input file to have
"body": {}
in the response body https://gist.github.com/YOU54F/994b85ff830ed2f6f21057779c0a40f0/revisions#diff-5f14bf76a8d5411742e1d427c982aca6fd3cc539aec6c998ddca5bb7f19c5565R63returns in the OAS being returned
npx -y pmpact https://gist.githubusercontent.com/YOU54F/994b85ff830ed2f6f21057779c0a40f0/raw/5665d6625bc0f692f730bac058e4456c5bfe565b/pact.json > postman-collection.json && npx -y p2o postman-collection.json
Returns
Not urgent for me, just been playing around with the tool and noted this. Great work BTW