public static function readFromYamlFile(string $fileName, string $baseType = OpenApi::class, $resolveReferences = true): SpecObjectInterface
    {
        $spec = static::readFromYaml(file_get_contents($fileName), $baseType);
        $spec->setReferenceContext(new ReferenceContext($spec, $fileName));
        if ($resolveReferences) {
            $spec->resolveReferences();
        }
        return $spec;
    }