PHP Class Swagger\Annotations\Parameter

Inheritance: extends AbstractAnnotation
ファイルを表示 Open project: zircote/swagger-php Class Usage Examples

Public Properties

Property Type Description
$_nested
$_parents
$_required
$_types
$collectionFormat string 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 brief description of the parameter. This could contain examples of use. GFM syntax can be used for rich text representation.
$enum array See http://json-schema.org/latest/json-schema-validation.html#anchor76.
$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.
$format string The extending format for the previously mentioned type. See Data Type Formats for further details.
$in string The location of the parameter. Possible values are "query", "header", "path", "formData" or "body".
$items array 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.
$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.
$minimum number See http://json-schema.org/latest/json-schema-validation.html#anchor21.
$multipleOf number See http://json-schema.org/latest/json-schema-validation.html#anchor14.
$name string The name of the parameter. Parameter names are case sensitive. If in is "path", the name field MUST correspond to the associated path segment from the path field in the Paths Object. See Path Templating for further information. For all other cases, the name corresponds to the parameter name used based on the in property.
$parameter string The key into Swagger->parameters or Path->parameters array.
$pattern string See http://json-schema.org/latest/json-schema-validation.html#anchor33.
$ref string $ref See http://json-schema.org/latest/json-schema-core.html#rfc.section.7
$required boolean Determines whether this parameter is mandatory. If the parameter is in "path", this property is required and its value MUST be true. Otherwise, the property MAY be included and its default value is false.
$schema Schema The schema defining the type used for the body parameter.
$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.

Public Methods

Method Description
identity ( )
validate ( $parents = [], $skip = [] )

Method Details

identity() public method

public identity ( )

validate() public method

public validate ( $parents = [], $skip = [] )

Property Details

$_nested public_oe static_oe property

public static $_nested

$_parents public_oe static_oe property

public static $_parents

$_required public_oe static_oe property

public static $_required

$_types public_oe static_oe property

public static $_types

$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 string $collectionFormat
return string

$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 brief description of the parameter. This could contain examples of use. GFM syntax can be used for rich text representation.
public string $description
return string

$enum public_oe property

See http://json-schema.org/latest/json-schema-validation.html#anchor76.
public array $enum
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

$format public_oe property

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

$in public_oe property

The location of the parameter. Possible values are "query", "header", "path", "formData" or "body".
public string $in
return string

$items public_oe property

Required if type is "array". Describes the type of items in the array.
public array $items
return array

$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

$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

$minimum public_oe property

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

$multipleOf public_oe property

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

$name public_oe property

The name of the parameter. Parameter names are case sensitive. If in is "path", the name field MUST correspond to the associated path segment from the path field in the Paths Object. See Path Templating for further information. For all other cases, the name corresponds to the parameter name used based on the in property.
public string $name
return string

$parameter public_oe property

The key into Swagger->parameters or Path->parameters array.
public string $parameter
return string

$pattern public_oe property

See http://json-schema.org/latest/json-schema-validation.html#anchor33.
public string $pattern
return string

$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

Determines whether this parameter is mandatory. If the parameter is in "path", this property is required and its value MUST be true. Otherwise, the property MAY be included and its default value is false.
public bool $required
return boolean

$schema public_oe property

The schema defining the type used for the body parameter.
public Schema,Swagger\Annotations $schema
return Schema

$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