diff --git a/Commands/GenerateAnnotations.php b/Commands/GenerateAnnotations.php
index a600781..1c147df 100644
--- a/Commands/GenerateAnnotations.php
+++ b/Commands/GenerateAnnotations.php
@@ -77,7 +77,10 @@ protected function doExecute(): int
return self::FAILURE;
}
- $plugin = $input->getOption('plugin') ?: 'Matomo';
+ $plugin = $input->getOption('plugin');
+ if (empty($plugin)) {
+ throw new \RuntimeException('Please specify a plugin name.');
+ }
$notDryRun = $input->getOption('not-dry-run') ?: false;
$output->writeln(sprintf('Generating annotations for: %s', $plugin));
@@ -85,7 +88,7 @@ protected function doExecute(): int
$result = (StaticContainer::get(AnnotationGenerator::class))->generatePluginApiAnnotations($plugin, $notDryRun);
if ($notDryRun) {
- $output->writeln('Results written to ' . $plugin . ' plugin\'s /OpenApi/Annotations directory.');
+ $output->writeln('Results written to plugins/OpenApiDocs/tmp/annotations/ directory.');
return $result ? self::SUCCESS : self::FAILURE;
}
diff --git a/Commands/GenerateSpecFile.php b/Commands/GenerateSpecFile.php
index 279a82c..f24aac4 100644
--- a/Commands/GenerateSpecFile.php
+++ b/Commands/GenerateSpecFile.php
@@ -73,7 +73,10 @@ protected function doExecute(): int
$input = $this->getInput();
$output = $this->getOutput();
- $plugin = $input->getOption('plugin') ?: 'Matomo';
+ $plugin = $input->getOption('plugin');
+ if (empty($plugin)) {
+ throw new \RuntimeException('Please specify a plugin name.');
+ }
$format = $input->getOption('format') ?: 'json';
$version = $input->getOption('version') ?: '1.0.0';
$notDryRun = $input->getOption('not-dry-run') ?: false;
@@ -85,7 +88,7 @@ protected function doExecute(): int
$result = (new SpecGenerator())->generatePluginDoc($plugin, $format, $version, $notDryRun);
if ($notDryRun) {
- $output->writeln('Results written to ' . $plugin . ' plugin\'s /OpenApi/Specs directory.');
+ $output->writeln('Results written to plugins/OpenApiDocs/tmp/specs/ directory.');
return $result ? self::SUCCESS : self::FAILURE;
}