Documentation

ExampleObject
in package
implements OpenApiAttributeInterface

The attribute may be used to add one or more examples to the definition of a parameter, request or response content, by defining it as field {@see \OpenApi\Attributes\Parameter::$examples} or {@see Content::$examples}

Interfaces, Classes, Traits and Enums

OpenApiAttributeInterface

Table of Contents

$description  : string
$extensions  : array<string|int, mixed>
$externalValue  : string
$name  : string
$ref  : string
$summary  : string
$value  : string
__construct()  : mixed

Properties

$extensions

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

Methods

__construct()

public __construct([string $name = "" ][, string $summary = "" ][, string $value = "" ][, string $externalValue = "" ][, array<string|int, Extension$extensions = [] ][, string $ref = "" ][, string $description = "" ]) : mixed
Parameters
$name : string = ""

A unique name to identify this particular example

$summary : string = ""

A brief summary of the purpose or context of the example

$value : string = ""

A string representation of the example. This is mutually exclusive with the $externalValue property, and ignored if the $externalValue property is specified. If the media type associated with the example allows parsing into an object, it may be converted from a string

$externalValue : string = ""

A URL to point to an external document to be used as an example. This is mutually exclusive with the $value property.

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

The list of optional extensions.

$ref : string = ""

A reference to a example defined in components examples.

$description : string = ""

A description of the purpose or context of the example.

Return values
mixed

Search results