mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
Lint fixes
This commit is contained in:
12
lib/util.js
12
lib/util.js
@@ -1208,24 +1208,24 @@ module.exports = {
|
||||
}
|
||||
catch (e) {
|
||||
// the SDK sometimes throws an exception in url.toString :/
|
||||
//console.error('Exception thrown while trying to stringify url for item.request:', item.request,
|
||||
// 'Exception:', e);
|
||||
// console.error('Exception thrown while trying to stringify url for item.request.url:', item.request.url,
|
||||
// 'Exception:', e);
|
||||
thisOriginalRequest.url = '';
|
||||
}
|
||||
try {
|
||||
thisOriginalRequest.header = item.request.headers.toJSON();
|
||||
}
|
||||
catch (e) {
|
||||
//console.error('Exception thrown while trying to stringify headers for item.request:', item.request,
|
||||
// 'Exception:', e);
|
||||
// console.error('Exception thrown while trying to stringify headers for item.request.headers:',
|
||||
// item.request.headers, 'Exception:', e);
|
||||
thisOriginalRequest.header = [];
|
||||
}
|
||||
try {
|
||||
thisOriginalRequest.body = (item.request.body ? item.request.body.toJSON() : {});
|
||||
}
|
||||
catch (e) {
|
||||
//console.error('Exception thrown while trying to json-ify body for item.request:', item.request,
|
||||
// 'Exception:', e);
|
||||
// console.error('Exception thrown while trying to json-ify body for item.request.body:', item.request.body,
|
||||
// 'Exception:', e);
|
||||
thisOriginalRequest.body = {};
|
||||
}
|
||||
item.responses.add(this.convertToPmResponse(swagResponse, code, thisOriginalRequest));
|
||||
|
||||
Reference in New Issue
Block a user