mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
Fixed issue where genberated collection contained response code as null
This commit is contained in:
@@ -1960,11 +1960,13 @@ module.exports = {
|
||||
else {
|
||||
responseHeaders.push({ key: 'Content-Type', value: TEXT_PLAIN });
|
||||
}
|
||||
// replace 'X' char with '0'
|
||||
code = code.replace(/X/g, '0');
|
||||
code = code === 'default' ? 500 : _.toSafeInteger(code);
|
||||
|
||||
sdkResponse = new sdk.Response({
|
||||
name: response.description,
|
||||
code: code === 'default' ? 500 : Number(code),
|
||||
code: code || 500,
|
||||
header: responseHeaders,
|
||||
body: responseBodyWrapper.responseBody,
|
||||
originalRequest: originalRequest
|
||||
|
||||
Reference in New Issue
Block a user