Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/Bridge/Symfony/Bundle/Command/GraphQlExportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

use ApiPlatform\Core\GraphQl\Type\SchemaBuilderInterface;
use GraphQL\Utils\SchemaPrinter;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
Expand All @@ -28,8 +29,14 @@
*
* @author Alan Poulain <contact@alanpoulain.eu>
*/
#[AsCommand(name: 'api:graphql:export', description: 'Export the GraphQL schema in Schema Definition Language (SDL)')]
class GraphQlExportCommand extends Command
{
/**
* @deprecated To be removed along with Symfony <6.1 compatibility
*/
protected static $defaultName = 'api:graphql:export';

private $schemaBuilder;

public function __construct(SchemaBuilderInterface $schemaBuilder)
Expand Down Expand Up @@ -77,9 +84,4 @@ protected function execute(InputInterface $input, OutputInterface $output)

return 0;
}

public static function getDefaultName(): string
{
return 'api:graphql:export';
}
}
12 changes: 7 additions & 5 deletions src/Bridge/Symfony/Bundle/Command/OpenApiCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
namespace ApiPlatform\Core\Bridge\Symfony\Bundle\Command;

use ApiPlatform\Core\OpenApi\Factory\OpenApiFactoryInterface;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Input\InputInterface;
Expand All @@ -27,8 +28,14 @@
/**
* Dumps Open API documentation.
*/
#[AsCommand(name: 'api:openapi:export', description: 'Dump the Open API documentation')]
Comment thread
chalasr marked this conversation as resolved.
final class OpenApiCommand extends Command
{
/**
* @deprecated To be removed along with Symfony <6.1 compatibility
*/
protected static $defaultName = 'api:openapi:export';

private $openApiFactory;
private $normalizer;

Expand Down Expand Up @@ -89,9 +96,4 @@ protected function execute(InputInterface $input, OutputInterface $output): int

return 0;
}

public static function getDefaultName(): string
{
return 'api:openapi:export';
}
}
12 changes: 7 additions & 5 deletions src/Bridge/Symfony/Bundle/Command/SwaggerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use ApiPlatform\Core\Metadata\Resource\Factory\ResourceNameCollectionFactoryInterface;
use ApiPlatform\Core\Swagger\Serializer\ApiGatewayNormalizer;
use ApiPlatform\Core\Swagger\Serializer\DocumentationNormalizer;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Exception\InvalidOptionException;
use Symfony\Component\Console\Input\InputInterface;
Expand All @@ -31,8 +32,14 @@
*
* @author Amrouche Hamza <hamza.simperfit@gmail.com>
*/
#[AsCommand(name: 'swagger:export', description: 'Dump the Swagger v2 documentation')]
final class SwaggerCommand extends Command
{
/**
* @deprecated To be removed along with Symfony <6.1 compatibility
*/
protected static $defaultName = 'api:swagger:export';

private $normalizer;
private $resourceNameCollectionFactory;
private $apiTitle;
Expand Down Expand Up @@ -107,9 +114,4 @@ protected function execute(InputInterface $input, OutputInterface $output): int

return 0;
}

public static function getDefaultName(): string
{
return 'api:swagger:export';
}
}
12 changes: 7 additions & 5 deletions src/JsonSchema/Command/JsonSchemaGenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use ApiPlatform\Core\Api\OperationType;
use ApiPlatform\Core\JsonSchema\Schema;
use ApiPlatform\Core\JsonSchema\SchemaFactoryInterface;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Exception\InvalidOptionException;
use Symfony\Component\Console\Input\InputArgument;
Expand All @@ -29,8 +30,14 @@
*
* @author Jacques Lefebvre <jacques@les-tilleuls.coop>
*/
#[AsCommand(name: 'api:json-schema:generate', description: 'Generates the JSON Schema for a resource operation.')]
final class JsonSchemaGenerateCommand extends Command
{
/**
* @deprecated To be removed along with Symfony <6.1 compatibility
*/
protected static $defaultName = 'api:json-schema:generate';

private $schemaFactory;
private $formats;

Expand Down Expand Up @@ -112,9 +119,4 @@ protected function execute(InputInterface $input, OutputInterface $output): int

return 0;
}

public static function getDefaultName(): string
{
return 'api:json-schema:generate';
}
}