Neos\Flow\Command\ConfigurationCommandController::generateSchemaCommand PHP Method

generateSchemaCommand() public method

./flow configuration:generateschema --type Settings --path Neos.Flow.persistence The schema will be output to standard output.
public generateSchemaCommand ( string $type = null, string $path = null, string $yaml = null ) : void
$type string Configuration type to create a schema for
$path string path to the subconfiguration separated by "." like "Neos.Flow"
$yaml string YAML file to create a schema for
return void
    public function generateSchemaCommand($type = null, $path = null, $yaml = null)
    {
        $data = null;
        if ($yaml !== null && is_file($yaml) && is_readable($yaml)) {
            $data = Yaml::parse($yaml);
        } elseif ($type !== null) {
            $data = $this->configurationManager->getConfiguration($type);
            if ($path !== null) {
                $data = Arrays::getValueByPath($data, $path);
            }
        }
        if (empty($data)) {
            $this->outputLine('Data was not found or is empty');
            $this->quit(1);
        }
        $this->outputLine(Yaml::dump($this->schemaGenerator->generate($data), 99));
    }