resolveResponseBody = (context, responseBody = {}, requestBodyExamples = {}, code = null) => {
    let responseContent,
      bodyType,
      allBodyData,
      headerFamily,
      acceptHeader,
      emptyResponse = [{
        body: undefined
      }],
      resolvedResponseBodyResult,
      resolvedResponseBodyTypes;

    if (_.isEmpty(responseBody)) {
      return emptyResponse;
    }

    if (responseBody.$ref) {
      responseBody = resolveSchema(context, responseBody, { isResponseSchema: true });
    }

    responseContent = responseBody.content;

    if (_.isEmpty(responseContent)) {
      return emptyResponse;
    }

    bodyType = getRawBodyType(responseContent);
    headerFamily = getHeaderFamily(bodyType);

    resolvedResponseBodyResult = resolveBodyData(
      context, responseContent[bodyType], bodyType, true, code, requestBodyExamples);
    allBodyData = resolvedResponseBodyResult.generatedBody;
    resolvedResponseBodyTypes = resolvedResponseBodyResult.resolvedSchemaType;

    return _.map(allBodyData, (bodyData) => {
      let requestBodyData = bodyData.request,
        responseBodyData = bodyData.response,
        exampleName = bodyData.name;

      if ((bodyType === TEXT_XML || bodyType === APP_XML || headerFamily === HEADER_TYPE.XML)) {
        responseBodyData && (responseBodyData = getXmlVersionContent(responseBodyData));
      }

      const { indentCharacter } = context.computedOptions,
        getRawModeData = (bodyData) => {
          return !_.isObject(bodyData) && _.isFunction(_.get(bodyData, 'toString')) ?
            bodyData.toString() :
            JSON.stringify(bodyData, null, indentCharacter);
        },
        requestRawModeData = getRawModeData(requestBodyData),
        responseRawModeData = getRawModeData(responseBodyData),
        responseMediaTypes = _.keys(responseContent);

      if (responseMediaTypes.length > 0) {
        acceptHeader = [{
          key: 'Accept',
          value: responseMediaTypes[0]
        }];
      }

      return {
        request: {
          body: requestRawModeData
        },
        body: responseRawModeData,
        contentHeader: [{
          key: 'Content-Type',
          value: bodyType
        }],
        name: exampleName,
        bodyType,
        acceptHeader,
        resolvedResponseBodyTypes: resolvedResponseBodyTypes
      };
    });
  }
Resolve the responses from definition which will be converted to request examples.
This includes both request and response body of corresponding example.

@param {Object} context - Global context object
@param {Object} responseBody - Response body schema
@param {Object} requestBodyExamples - Examples defined in the request body of corresponding operation
@param {String} code - Response code
@returns {Array} - Postman examples