protected function convert(AbstractConverter $converter, array $schemas, array $targets, OutputInterface $output)
{
$items = $converter->convert($schemas);
$dumper = new Dumper();
$pathGenerator = new Psr4PathGenerator($targets);
$progress = new ProgressBar($output, count($items));
$progress->start();
foreach ($items as $item) {
$progress->advance();
$output->write(" Item <info>" . key($item) . "</info>... ");
$source = $dumper->dump($item, 10000);
$output->write("created source... ");
$path = $pathGenerator->getPath($item);
$bytes = file_put_contents($path, $source);
$output->writeln("saved source <comment>{$bytes} bytes</comment>.");
}
}