Documentation

Content
in package
implements OpenApiAttributeInterface

The attribute may be used to define the content/media type of a parameter, request or response, by defining it as field {@see \OpenApi\Attributes\Parameter::$content}, {@see \OpenApi\Attributes\Parameters\RequestBody::$content} or {@see \OpenApi\Attributes\Responses\ApiResponse::$content}.

Interfaces, Classes, Traits and Enums

OpenApiAttributeInterface

Table of Contents

$array  : ArraySchema|null
$encoding  : array<string|int, mixed>
$examples  : array<string|int, mixed>
$extensions  : array<string|int, mixed>
$mediaType  : string
$schema  : Schema|null
__construct()  : mixed

Properties

$encoding

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

$examples

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

$extensions

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

$mediaType

public string $mediaType = ""

Methods

__construct()

public __construct([string $mediaType = "" ][, array<string|int, ExampleObject$examples = [] ][, Schema|null $schema = null ][, ArraySchema|null $array = null ][, array<string|int, Encoding$encoding = [] ][, array<string|int, Extension$extensions = [] ]) : mixed
Parameters
$mediaType : string = ""

The media type that this object applies to.

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

An array of examples used to show the use of the associated schema.

$schema : Schema|null = null

The schema defining the type used for the content.

$array : ArraySchema|null = null

The schema of the array that defines the type used for the content.

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

An array of encodings. The key, being the property name, MUST exist in the schema as a property.

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

The list of optional extensions

Return values
mixed

Search results