function checkContentTypeHeader (headers, transactionPathPrefix, schemaPathPrefix, contentObj,
  mismatchProperty, options) {
  let mediaTypes = [],
    contentHeader,
    contentHeaderIndex,
    contentHeaderMediaType,
    suggestedContentHeader,
    hasComputedType,
    humanPropName = mismatchProperty === 'HEADER' ? 'header' : 'response header',
    mismatches = [];

  // get all media types present in content object
  _.forEach(_.keys(contentObj), (contentType) => {
    let contentMediaType = parseMediaType(contentType);

    mediaTypes.push({
      type: contentMediaType.type,
      subtype: contentMediaType.subtype,
      contentType: contentMediaType.type + '/' + contentMediaType.subtype
    });
  });

  // prefer JSON > XML > Other media types for suggested header.
  _.forEach(mediaTypes, (mediaType) => {
    let headerFamily = getHeaderFamily(mediaType.contentType);

    if (headerFamily !== HEADER_TYPE.INVALID) {
      suggestedContentHeader = mediaType.contentType;
      hasComputedType = true;
      if (headerFamily === HEADER_TYPE.JSON) {
        return false;
      }
    }
  });

  // if no JSON or XML, take whatever we have
  if (!hasComputedType && mediaTypes.length > 0) {
    suggestedContentHeader = mediaTypes[0].contentType;
    hasComputedType = true;
  }

  // get content-type header and info
  _.forEach(headers, (header, index) => {
    if (_.toLower(header.key) === 'content-type') {
      let mediaType = parseMediaType(header.value);

      contentHeader = header;
      contentHeaderIndex = index;
      contentHeaderMediaType = mediaType.type + '/' + mediaType.subtype;
      return false;
    }
  });

  // Schema body content has no media type objects
  if (!_.isEmpty(contentHeader) && _.isEmpty(mediaTypes)) {
    // ignore mismatch for default header (text/plain) added by conversion
    if (options.showMissingInSchemaErrors && _.toLower(contentHeaderMediaType) !== TEXT_PLAIN) {
      mismatches.push({
        property: mismatchProperty,
        transactionJsonPath: transactionPathPrefix + `[${contentHeaderIndex}]`,
        schemaJsonPath: null,
        reasonCode: 'MISSING_IN_SCHEMA',
        // Reason for missing in schema suggests that certain media type in req/res body is not present
        reason: `The ${mismatchProperty === 'HEADER' ? 'request' : 'response'} body should have media type` +
          ` "${contentHeaderMediaType}"`
      });
    }
  }

  // No request/response content-type header
  else if (_.isEmpty(contentHeader) && !_.isEmpty(mediaTypes)) {
    let mismatchObj = {
      property: mismatchProperty,
      transactionJsonPath: transactionPathPrefix,
      schemaJsonPath: schemaPathPrefix,
      reasonCode: 'MISSING_IN_REQUEST',
      reason: `The ${humanPropName} "Content-Type" was not found in the transaction`
    };

    if (options.suggestAvailableFixes) {
      mismatchObj.suggestedFix = {
        key: 'Content-Type',
        actualValue: null,
        suggestedValue: {
          key: 'Content-Type',
          value: suggestedContentHeader
        }
      };
    }
    mismatches.push(mismatchObj);
  }

  // Invalid type of header found
  else if (!_.isEmpty(contentHeader)) {
    let mismatchObj,
      matched = false;

    // wildcard header matching
    _.forEach(mediaTypes, (mediaType) => {
      let transactionHeader = _.split(contentHeaderMediaType, '/'),
        headerTypeMatched = (mediaType.type === '*' || mediaType.type === transactionHeader[0]),
        headerSubtypeMatched = (mediaType.subtype === '*' || mediaType.subtype === transactionHeader[1]);

      if (headerTypeMatched && headerSubtypeMatched) {
        matched = true;
      }
    });

    if (!matched) {
      mismatchObj = {
        property: mismatchProperty,
        transactionJsonPath: transactionPathPrefix + `[${contentHeaderIndex}].value`,
        schemaJsonPath: schemaPathPrefix,
        reasonCode: 'INVALID_TYPE',
        reason: `The ${humanPropName} "Content-Type" needs to be "${suggestedContentHeader}",` +
          ` but we found "${contentHeaderMediaType}" instead`
      };

      if (options.suggestAvailableFixes) {
        mismatchObj.suggestedFix = {
          key: 'Content-Type',
          actualValue: contentHeader.value,
          suggestedValue: suggestedContentHeader
        };
      }
      mismatches.push(mismatchObj);
    }
  }
  return mismatches;
}
Gives mismtach for content type header for request/response

@param {Array} headers - Transaction Headers
@param {String} transactionPathPrefix - Transaction Path to headers
@param {String} schemaPathPrefix - Schema path to content object
@param {Object} contentObj - Corresponding Schema content object
@param {String} mismatchProperty - Mismatch property (HEADER / RESPONSE_HEADER)
@param {*} options - OAS options, check lib/options.js for more
@returns {Array} found mismatch objects