private function parseRamlString($ramlString, $rootDir)
    {
        // get the header
        $header = \strtok($ramlString, "\n");

        $data = $this->parseYaml($ramlString);

        if (empty($data)) {
            throw new \RuntimeException('RAML file appears to be empty');
        }

        if (\strpos($header, '#%RAML') === 0) {
            // @todo extract the raml version and do something with it

            $data = $this->includeAndParseFiles(
                $data,
                $rootDir
            );
        }

        return $data;
    }