PHP Class Swagger\Annotations\Schema

Inheritance: extends AbstractAnnotation
Datei anzeigen Open project: zircote/swagger-php Class Usage Examples

Public Properties

Property Type Description
$_nested
$_parents
$_types
$additionalProperties boolean | object http://json-schema.org/latest/json-schema-validation.html#anchor64
$allOf Schema[] An instance validates successfully against this property if it validates successfully against all schemas defined by this property's value.
$collectionFormat Determines the format of the array if type array is used. Possible values are: csv - comma separated values foo,bar. ssv - space separated values foo bar. tsv - tab separated values foo\tbar. pipes - pipe separated values foo|bar. multi - corresponds to multiple parameter instances instead of multiple values for a single instance foo=bar&foo=baz. This is valid only for parameters in "query" or "formData". Default value is csv.
$default mixed Sets a default value to the parameter. The type of the value depends on the defined type. See http://json-schema.org/latest/json-schema-validation.html#anchor101.
$description string A description will provide explanation about the purpose of the instance described by this schema.
$discriminator string Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schemas that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it.
$enum array See http://json-schema.org/latest/json-schema-validation.html#anchor76.
$example array A free-form property to include a an example of an instance for this schema.
$exclusiveMaximum boolean See http://json-schema.org/latest/json-schema-validation.html#anchor17.
$exclusiveMinimum boolean See http://json-schema.org/latest/json-schema-validation.html#anchor21.
$externalDocs ExternalDocumentation Additional external documentation for this schema.
$format string The extending format for the previously mentioned type. See Data Type Formats for further details.
$items Items Required if type is "array". Describes the type of items in the array.
$maxItems integer See http://json-schema.org/latest/json-schema-validation.html#anchor42.
$maxLength integer See http://json-schema.org/latest/json-schema-validation.html#anchor26.
$maxProperties integer An object instance is valid against "maxProperties" if its number of properties is less than, or equal to, the value of this property.
$maximum number See http://json-schema.org/latest/json-schema-validation.html#anchor17.
$minItems integer See http://json-schema.org/latest/json-schema-validation.html#anchor45.
$minLength integer See http://json-schema.org/latest/json-schema-validation.html#anchor29.
$minProperties integer An object instance is valid against "minProperties" if its number of properties is greater than, or equal to, the value of this property.
$minimum number See http://json-schema.org/latest/json-schema-validation.html#anchor21.
$multipleOf number A numeric instance is valid against "multipleOf" if the result of the division of the instance by this property's value is an integer.
$pattern string A string instance is considered valid if the regular expression matches the instance successfully.
$properties Property[]
$readOnly boolean Relevant only for Schema "properties" definitions. Declares the property as "read only". This means that it MAY be sent as part of a response but MUST NOT be sent as part of the request. Properties marked as readOnly being true SHOULD NOT be in the required list of the defined schema. Default value is false.
$ref string $ref See http://json-schema.org/latest/json-schema-core.html#rfc.section.7
$required string[] An object instance is valid against this property if its property set contains all elements in this property's array value.
$title string Can be used to decorate a user interface with information about the data produced by this user interface. preferrably be short.
$type string The type of the parameter. Since the parameter is not located at the request body, it is limited to simple types (that is, not an object). The value MUST be one of "string", "number", "integer", "boolean", "array" or "file". If type is "file", the consumes MUST be either "multipart/form-data" or " application/x-www-form-urlencoded" and the parameter MUST be in "formData".
$uniqueItems boolean See http://json-schema.org/latest/json-schema-validation.html#anchor49.
$xml Xml This MAY be used only on properties schemas. It has no effect on root schemas. Adds Additional metadata to describe the XML representation format of this property.

Property Details

$_nested public_oe static_oe property

public static $_nested

$_parents public_oe static_oe property

public static $_parents

$_types public_oe static_oe property

public static $_types

$additionalProperties public_oe property

http://json-schema.org/latest/json-schema-validation.html#anchor64
public bool|object $additionalProperties
return boolean | object

$allOf public_oe property

An instance validates successfully against this property if it validates successfully against all schemas defined by this property's value.
public Schema[],Swagger\Annotations $allOf
return Schema[]

$collectionFormat public_oe property

Determines the format of the array if type array is used. Possible values are: csv - comma separated values foo,bar. ssv - space separated values foo bar. tsv - tab separated values foo\tbar. pipes - pipe separated values foo|bar. multi - corresponds to multiple parameter instances instead of multiple values for a single instance foo=bar&foo=baz. This is valid only for parameters in "query" or "formData". Default value is csv.
public $collectionFormat

$default public_oe property

Sets a default value to the parameter. The type of the value depends on the defined type. See http://json-schema.org/latest/json-schema-validation.html#anchor101.
public mixed $default
return mixed

$description public_oe property

A description will provide explanation about the purpose of the instance described by this schema.
public string $description
return string

$discriminator public_oe property

Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schemas that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it.
public string $discriminator
return string

$enum public_oe property

See http://json-schema.org/latest/json-schema-validation.html#anchor76.
public array $enum
return array

$example public_oe property

A free-form property to include a an example of an instance for this schema.
public array $example
return array

$exclusiveMaximum public_oe property

See http://json-schema.org/latest/json-schema-validation.html#anchor17.
public bool $exclusiveMaximum
return boolean

$exclusiveMinimum public_oe property

See http://json-schema.org/latest/json-schema-validation.html#anchor21.
public bool $exclusiveMinimum
return boolean

$externalDocs public_oe property

Additional external documentation for this schema.
public ExternalDocumentation,Swagger\Annotations $externalDocs
return ExternalDocumentation

$format public_oe property

The extending format for the previously mentioned type. See Data Type Formats for further details.
public string $format
return string

$items public_oe property

Required if type is "array". Describes the type of items in the array.
public Items,Swagger\Annotations $items
return Items

$maxItems public_oe property

See http://json-schema.org/latest/json-schema-validation.html#anchor42.
public int $maxItems
return integer

$maxLength public_oe property

See http://json-schema.org/latest/json-schema-validation.html#anchor26.
public int $maxLength
return integer

$maxProperties public_oe property

An object instance is valid against "maxProperties" if its number of properties is less than, or equal to, the value of this property.
public int $maxProperties
return integer

$maximum public_oe property

See http://json-schema.org/latest/json-schema-validation.html#anchor17.
public number $maximum
return number

$minItems public_oe property

See http://json-schema.org/latest/json-schema-validation.html#anchor45.
public int $minItems
return integer

$minLength public_oe property

See http://json-schema.org/latest/json-schema-validation.html#anchor29.
public int $minLength
return integer

$minProperties public_oe property

An object instance is valid against "minProperties" if its number of properties is greater than, or equal to, the value of this property.
public int $minProperties
return integer

$minimum public_oe property

See http://json-schema.org/latest/json-schema-validation.html#anchor21.
public number $minimum
return number

$multipleOf public_oe property

A numeric instance is valid against "multipleOf" if the result of the division of the instance by this property's value is an integer.
public number $multipleOf
return number

$pattern public_oe property

A string instance is considered valid if the regular expression matches the instance successfully.
public string $pattern
return string

$properties public_oe property

public Property[],Swagger\Annotations $properties
return Property[]

$readOnly public_oe property

Relevant only for Schema "properties" definitions. Declares the property as "read only". This means that it MAY be sent as part of a response but MUST NOT be sent as part of the request. Properties marked as readOnly being true SHOULD NOT be in the required list of the defined schema. Default value is false.
public bool $readOnly
return boolean

$ref public_oe property

$ref See http://json-schema.org/latest/json-schema-core.html#rfc.section.7
public string $ref
return string

$required public_oe property

An object instance is valid against this property if its property set contains all elements in this property's array value.
public string[] $required
return string[]

$title public_oe property

Can be used to decorate a user interface with information about the data produced by this user interface. preferrably be short.
public string $title
return string

$type public_oe property

The type of the parameter. Since the parameter is not located at the request body, it is limited to simple types (that is, not an object). The value MUST be one of "string", "number", "integer", "boolean", "array" or "file". If type is "file", the consumes MUST be either "multipart/form-data" or " application/x-www-form-urlencoded" and the parameter MUST be in "formData".
public string $type
return string

$uniqueItems public_oe property

See http://json-schema.org/latest/json-schema-validation.html#anchor49.
public bool $uniqueItems
return boolean

$xml public_oe property

This MAY be used only on properties schemas. It has no effect on root schemas. Adds Additional metadata to describe the XML representation format of this property.
public Xml,Swagger\Annotations $xml
return Xml