mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
added test for convertPmBodyResponse function
This commit is contained in:
@@ -1164,10 +1164,12 @@ module.exports = {
|
||||
if (responseBodyWrapper.contentTypeHeader) {
|
||||
// we could infer the content-type header from the body
|
||||
responseHeaders.push({ key: 'Content-Type', value: responseBodyWrapper.contentTypeHeader });
|
||||
if (responseBodyWrapper.contentTypeHeader === APP_JSON) {
|
||||
if (this.checkHeaderType(responseBodyWrapper.contentTypeHeader) &&
|
||||
responseBodyWrapper.contentTypeHeader.endsWith('json')) {
|
||||
previewLanguage = 'json';
|
||||
}
|
||||
else if (responseBodyWrapper.contentTypeHeader === APP_XML) {
|
||||
else if (this.checkHeaderType(responseBodyWrapper.contentTypeHeader) &&
|
||||
responseBodyWrapper.contentTypeHeader.endsWith('xml')) {
|
||||
previewLanguage = 'xml';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user