src/Reader.php
public static function readFromYaml(string $yaml, string $baseType = OpenApi::class): SpecObjectInterface
    {
        return new $baseType(Yaml::parse($yaml));
    }
public static function readFromYaml(string $yaml, string $baseType = OpenApi::class): SpecObjectInterface
    {
        return new $baseType(Yaml::parse($yaml));
    }
public static function readFromYaml ( string $ yaml , string $ baseType = OpenApi :: class ) : SpecObjectInterface { return new $ baseType ( Yaml :: parse ( $ yaml ) ) ; }
Populate OpenAPI spec object from YAML data.
@param string $yaml the YAML string to decode.
@param string $baseType the base Type to instantiate. This must be an instance of [[SpecObjectInterface]].
The default is [[OpenApi]] which is the base type of a OpenAPI specification file.
You may choose a different type if you instantiate objects from sub sections of a specification.
@return SpecObjectInterface|OpenApi the OpenApi object instance.
@throws TypeErrorException in case invalid spec data is supplied.
Populate OpenAPI spec object from YAML data .