Documentation

ArraySchema
in package
implements OpenApiAttributeInterface

The attribute may be used to define a schema of type "array" for a set of elements of the OpenAPI spec, and/or to define additional properties for the schema. It is applicable e.g. to parameters, schema classes (aka "models"), properties of such models, request and response content, header. The attribute {@see Schema} shall be used for non array elements; {@see ArraySchema} and {@see Schema} cannot coexist.

Interfaces, Classes, Traits and Enums

OpenApiAttributeInterface

Table of Contents

$arraySchema  : Schema|null
$extensions  : array<string|int, mixed>
$maxItems  : int
$minItems  : int
$schema  : Schema|null
$uniqueItems  : bool
__construct()  : mixed

Properties

$extensions

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

Methods

__construct()

public __construct([Schema|null $schema = null ][, Schema|null $arraySchema = null ][, int $maxItems = PHP_INT_MIN ][, int $minItems = PHP_INT_MAX ][, bool $uniqueItems = false ][, array<string|int, Extension$extensions = [] ]) : mixed
Parameters
$schema : Schema|null = null

The schema of the items in the array.

$arraySchema : Schema|null = null

Allows to define the properties to be resolved into properties of the schema of type array (not the ones of the $items of such schema which are defined in ArraySchema::$schema.

$maxItems : int = PHP_INT_MIN

Sets the maximum number of items in an array. Ignored if value is PHP_INT_MIN.

$minItems : int = PHP_INT_MAX

Sets the minimum number of items in an array. Ignored if value is PHP_INT_MAX.

$uniqueItems : bool = false

Determines whether an array of items will be unique.

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

The list of optional extensions.

Return values
mixed

Search results