private function parseTraits($ramlData)
    {
        if (isset($ramlData['traits'])) {
            $keyedTraits = [];
            foreach ($ramlData['traits'] as $key => $trait) {
                if (\is_int($key)) {
                    foreach ($trait as $k => $t) {
                        $keyedTraits[$k] = $t;
                    }
                } else {
                    foreach ($trait as $k => $t) {
                        $keyedTraits[$key][$k] = $t;
                    }
                }
            }

            foreach ($ramlData as $key => $value) {
                if (\strpos($key, '/') === 0) {
                    $name = (isset($value['displayName'])) ? $value['displayName'] : \substr($key, 1);
                    $ramlData[$key] = $this->replaceTraits($value, $keyedTraits, $key, $name);
                }
            }
        }

        // ---

        return $ramlData;
    }