public function supportsMimeType(string $mimeType, string $class = null): ConfigurableRoute
    {
        if (null === $class && !SupportedMimeTypes::provideDefaultClassFor($mimeType)) {
            throw new \InvalidArgumentException(
                    'No default class known for mime type ' . $mimeType
                    . ', please provide a class'
            );
        }

        $this->mimeTypes[] = $mimeType;
        if (null !== $class) {
            $this->mimeTypeClasses[$mimeType] = $class;
        }

        return $this;
    }