code: function http415 (req, res, next) {
    if (util.isSwaggerRequest(req)) {
      // Only validate the Content-Type if there's body content
      if (!_.isEmpty(req.body)) {
        // Get the MIME types that this operation consumes
        let consumes = req.swagger.operation.consumes || req.swagger.api.consumes || [];
  
        if (consumes.length > 0) {
          util.debug("Validating Content-Type header (%s)", req.get("Content-Type"));
  
          if (!req.is(consumes)) {
            let contentType = req.header("Content-Type");
            util.debug(
              'Client attempted to send %s data to the %s operation on "%s", which is not allowed by the Swagger API. ' +
              "Returning HTTP 415 (Unsupported Media Type)",
              contentType, req.method, req.path
            );
            throw ono({ status: 415 }, '%s %s does not allow Content-Type "%s". \nAllowed Content-Types: %s',
              req.method, req.path, contentType, consumes.join(", "));
          }
        }
      }
    }
  
    next();
  }
docs: Validates the HTTP Content-Type header against the Swagger API's "consumes" MIME types,
  and throws an HTTP 415 (Unsupported Media Type) if there's a conflict.