def METHOD_NAME(self, mime_type: str) -> None:
    """Validate the mime type against the spec if it defines which mime types are accepted.
    :param mime_type: mime type from content type header
    """
    if not self._operation.consumes:
        return
    # Convert to MediaTypeDict to handle media-ranges
    media_type_dict = MediaTypeDict(
        [(c.lower(), None) for c in self._operation.consumes]
    )
    if mime_type.lower() not in media_type_dict:
        raise UnsupportedMediaTypeProblem(
            detail=f"Invalid Content-type ({mime_type}), "
            f"expected {self._operation.consumes}"
        )