Documentation

Operation
in package
implements OpenApiAttributeInterface

The attribute may be used to define a resource method as an OpenAPI Operation, and/or to define additional properties for the Operation.

The following fields can also alternatively be defined at method level (as repeatable attributes in case of arrays), in this case method level attributes take precedence over Operation attribute fields:

Interfaces, Classes, Traits and Enums

OpenApiAttributeInterface

Table of Contents

$deprecated  : bool
$description  : string
$extensions  : array<string|int, mixed>
$externalDocs  : ExternalDocumentation|null
$hidden  : bool
$ignoreJsonView  : bool
$method  : string|null
$operationId  : string
$parameters  : array<string|int, mixed>
$requestBody  : RequestBody|null
$responses  : array<string|int, mixed>
$security  : array<string|int, mixed>
$servers  : array<string|int, mixed>
$summary  : string
$tags  : array<string|int, mixed>
__construct()  : mixed

Properties

$description

public string $description = ""

$extensions

public array<string|int, mixed> $extensions = []

$ignoreJsonView

public bool $ignoreJsonView = false

$operationId

public string $operationId = ""

$parameters

public array<string|int, mixed> $parameters = []

$responses

public array<string|int, mixed> $responses = []

$security

public array<string|int, mixed> $security = []

$servers

public array<string|int, mixed> $servers = []

$tags

public array<string|int, mixed> $tags = []

Methods

__construct()

public __construct([string|null $method = null ][, array<string|int, string> $tags = [] ][, string $summary = "" ][, string $description = "" ][, RequestBody|null $requestBody = null ][, ExternalDocumentation|null $externalDocs = null ][, string $operationId = "" ][, array<string|int, Parameter$parameters = [] ][, array<string|int, ApiResponse$responses = [] ][, bool $deprecated = false ][, array<string|int, SecurityRequirement$security = [] ][, array<string|int, Server$servers = [] ][, array<string|int, Extension$extensions = [] ][, bool $hidden = false ][, bool $ignoreJsonView = false ]) : mixed
Parameters
$method : string|null = null

The HTTP method for this operation.

$tags : array<string|int, string> = []

Tags can be used for logical grouping of operations by resources or any other qualifier.

$summary : string = ""

Provides a brief description of this operation. Should be 120 characters or less for proper visibility in Swagger-UI.

$description : string = ""

A verbose description of the operation.

$requestBody : RequestBody|null = null

Request body associated to the operation.

$externalDocs : ExternalDocumentation|null = null

Additional external documentation for this operation.

$operationId : string = ""

The operationId is used by third-party tools to uniquely identify this operation.

$parameters : array<string|int, Parameter> = []

An optional array of parameters which will be added to any automatically detected parameters in the method itself.

$responses : array<string|int, ApiResponse> = []

The list of possible responses as they are returned from executing this operation.

$deprecated : bool = false

Allows an operation to be marked as deprecated.

$security : array<string|int, SecurityRequirement> = []

A declaration of which security mechanisms can be used for this operation.

$servers : array<string|int, Server> = []

An alternative server array to service this operation.

$extensions : array<string|int, Extension> = []

The list of optional extensions.

$hidden : bool = false

Allows this operation to be marked as hidden.

$ignoreJsonView : bool = false

Ignores JsonView attributes while resolving operations and types.

Return values
mixed

Search results