References JsonSchemaGenerateCommand
Reference
C
Class

ApiPlatform\JsonSchema\Command\JsonSchemaGenerateCommand

Generates a resource JSON Schema.

class ApiPlatform\JsonSchema\Command\JsonSchemaGenerateCommand extends Symfony\Component\Console\Command\Command
{
    public __construct(ApiPlatform\JsonSchema\SchemaFactoryInterface $schemaFactory, array $formats)
    protected configure(): null
    protected execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int
    public getDefaultName(): string
    public getDefaultDescription(): string
    public ignoreValidationErrors(): null
    public setApplication(null|Symfony\Component\Console\Application $application): null
    public setHelperSet(Symfony\Component\Console\Helper\HelperSet $helperSet): null
    public getHelperSet(): Symfony\Component\Console\Helper\HelperSet
    public getApplication(): Symfony\Component\Console\Application
    public isEnabled(): bool
    protected interact(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): null
    protected initialize(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): null
    public run(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int
    public complete(Symfony\Component\Console\Completion\CompletionInput $input, Symfony\Component\Console\Completion\CompletionSuggestions $suggestions): null
    public setCode(callable $code): Symfony\Component\Console\Command\Command
    public mergeApplicationDefinition(bool $mergeArgs): null
    public setDefinition(Symfony\Component\Console\Input\InputDefinition|array $definition): Symfony\Component\Console\Command\Command
    public getDefinition(): Symfony\Component\Console\Input\InputDefinition
    public getNativeDefinition(): Symfony\Component\Console\Input\InputDefinition
    public addArgument(string $name, null|int $mode, string $description, $default, array|callable $suggestedValues): Symfony\Component\Console\Command\Command
    public addOption(string $name, null|array|string $shortcut, null|int $mode, string $description, $default, array|callable $suggestedValues): Symfony\Component\Console\Command\Command
    public setName(string $name): Symfony\Component\Console\Command\Command
    public setProcessTitle(string $title): Symfony\Component\Console\Command\Command
    public getName(): string
    public setHidden(bool $hidden): Symfony\Component\Console\Command\Command
    public isHidden(): bool
    public setDescription(string $description): Symfony\Component\Console\Command\Command
    public getDescription(): string
    public setHelp(string $help): Symfony\Component\Console\Command\Command
    public getHelp(): string
    public getProcessedHelp(): string
    public setAliases(array<int, string> $aliases): Symfony\Component\Console\Command\Command
    public getAliases(): array
    public getSynopsis(bool $short): string
    public addUsage(string $usage): Symfony\Component\Console\Command\Command
    public getUsages(): array
    public getHelper(string $name): Symfony\Component\Console\Helper\HelperInterface
}

Methods

__construct

public __construct(ApiPlatform\JsonSchema\SchemaFactoryInterface $schemaFactory, array $formats)

Parameters

schemaFactory`ApiPlatform\JsonSchema\SchemaFactoryInterface`
formatsarray

configure

Configures the current command.

protected configure(): null

Returns

null

execute

Executes the current command.This method is not abstract because you can use this class as a concrete class. In this case, instead of defining the execute() method, you set the code to execute by passing a Closure to the setCode() method.

protected execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int

Parameters

inputSymfony\Component\Console\Input\InputInterface
outputSymfony\Component\Console\Output\OutputInterface

Returns

int

getDefaultName

public getDefaultName(): string

Returns

string

Made with love by

Les-Tilleuls.coop can help you design and develop your APIs and web projects, and train your teams in API Platform, Symfony, Next.js, Kubernetes and a wide range of other technologies.

Learn more

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop