private function replaceSchemas($array, $schemas)
    {
        if (!\is_array($array)) {
            return $array;
        }
        foreach ($array as $key => $value) {
            if ('schema' === $key) {
                if (isset($schemas[$value])) {
                    $array[$key] = $schemas[$value];
                }
            } else {
                $array[$key] = $this->replaceSchemas($value, $schemas);
            }
        }

        return $array;
    }
private function replaceSchemas($array, $schemas)
    {
        if (!\is_array($array)) {
            return $array;
        }
        foreach ($array as $key => $value) {
            if ('schema' === $key) {
                if (isset($schemas[$value])) {
                    $array[$key] = $schemas[$value];
                }
            } else {
                $array[$key] = $this->replaceSchemas($value, $schemas);
            }
        }

        return $array;
    }
private function replaceSchemas ( $ array , $ schemas ) { if ( ! \ is_array ( $ array ) ) { return $ array ; } foreach ( $ array as $ key => $ value ) { if ( 'schema' === $ key ) { if ( isset ( $ schemas [ $ value ] ) ) { $ array [ $ key ] = $ schemas [ $ value ] ; } } else { $ array [ $ key ] = $ this -> replaceSchemas ( $ value , $ schemas ) ; } } return $ array ; }
Replaces schema into the raml file

@param  array $array
@param  array $schemas List of available schema definition.

@return array
Replaces schema into the raml file