Skip to content

Commit 51310fd

Browse files
authored
Merge pull request #3798 from deguif/lazy-load-command
Lazy load remaining commands
2 parents b5c72b7 + ff931eb commit 51310fd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Bridge/Symfony/Bundle/Command/OpenApiCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
*/
3030
final class OpenApiCommand extends Command
3131
{
32+
protected static $defaultName = 'api:openapi:export';
33+
3234
private $openApiFactory;
3335
private $normalizer;
3436

@@ -45,7 +47,6 @@ public function __construct(OpenApiFactoryInterface $openApiFactory, NormalizerI
4547
protected function configure()
4648
{
4749
$this
48-
->setName('api:openapi:export')
4950
->setDescription('Dump the Open API documentation')
5051
->addOption('yaml', 'y', InputOption::VALUE_NONE, 'Dump the documentation in YAML')
5152
->addOption('output', 'o', InputOption::VALUE_OPTIONAL, 'Write output to file')

src/Bridge/Symfony/Bundle/Command/SwaggerCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
*/
3434
final class SwaggerCommand extends Command
3535
{
36+
protected static $defaultName = 'api:swagger:export';
37+
3638
private $normalizer;
3739
private $resourceNameCollectionFactory;
3840
private $apiTitle;
@@ -67,7 +69,6 @@ public function __construct(NormalizerInterface $normalizer, ResourceNameCollect
6769
protected function configure()
6870
{
6971
$this
70-
->setName('api:swagger:export')
7172
->setDescription('Dump the Swagger v2 documentation')
7273
->addOption('yaml', 'y', InputOption::VALUE_NONE, 'Dump the documentation in YAML')
7374
->addOption('spec-version', null, InputOption::VALUE_OPTIONAL, sprintf('OpenAPI version to use (%s)', implode(' or ', $this->swaggerVersions)), $this->swaggerVersions[0] ?? 2)

0 commit comments

Comments
 (0)