Skip to content

Commit

Permalink
Lazy console commands
Browse files Browse the repository at this point in the history
  • Loading branch information
vyacheslav-startsev committed Jul 8, 2020
1 parent 51573a3 commit 90b0151
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Bridge/Symfony/Bundle/Command/SwaggerCommand.php
Expand Up @@ -33,6 +33,8 @@
*/
final class SwaggerCommand extends Command
{
protected static $defaultName = 'api:openapi:export';

private $normalizer;
private $resourceNameCollectionFactory;
private $apiTitle;
Expand Down Expand Up @@ -67,7 +69,6 @@ public function __construct(NormalizerInterface $normalizer, ResourceNameCollect
protected function configure()
{
$this
->setName('api:openapi:export')
->setAliases(['api:swagger:export'])
->setDescription('Dump the OpenAPI documentation')
->addOption('yaml', 'y', InputOption::VALUE_NONE, 'Dump the documentation in YAML')
Expand Down
3 changes: 2 additions & 1 deletion src/JsonSchema/Command/JsonSchemaGenerateCommand.php
Expand Up @@ -31,6 +31,8 @@
*/
final class JsonSchemaGenerateCommand extends Command
{
protected static $defaultName = 'api:json-schema:generate';

private $schemaFactory;
private $formats;

Expand All @@ -48,7 +50,6 @@ public function __construct(SchemaFactoryInterface $schemaFactory, array $format
protected function configure()
{
$this
->setName('api:json-schema:generate')
->setDescription('Generates the JSON Schema for a resource operation.')
->addArgument('resource', InputArgument::REQUIRED, 'The Fully Qualified Class Name (FQCN) of the resource')
->addOption('itemOperation', null, InputOption::VALUE_REQUIRED, 'The item operation')
Expand Down

0 comments on commit 90b0151

Please sign in to comment.