Loading...
Searching...
No Matches
ParameterItemsSchemaObject Class Reference

items schema object for non-body parameters More...

Inheritance diagram for ParameterItemsSchemaObject:
[legend]

## Static Public Member Functions

static ParameterItemsSchemaObject | newSchemaObject (string name, auto error, SwaggerSchema swagger)
| throws an `"INVALID-FIELD-TYPE"` exception
static ParameterItemsSchemaObject | newSchemaObject (string name, hash< auto > oh, SwaggerSchema swagger)
| returns a SchemaObject for the schema definition; resolves references
Static Public Member Functions inherited from SchemaObject
static SchemaObject | newSchemaObject (string name, auto error, SwaggerSchema swagger)
| throws an `"INVALID-FIELD-TYPE"` exception
static SchemaObject | newSchemaObject (string name, hash< auto > oh, SwaggerSchema swagger)
| returns a SchemaObject for the schema definition; resolves references

## Public Attributes

*string | collectionFormat
| Determines the format of the array if type array is used.
Public Attributes inherited from SchemaObject
auto | additionalProperties
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.4.
auto | defaultVal
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
*string | desc
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.1.
*string | discriminator
| Adds support for polymorphism.
auto | example
| A free-form property to include an example of an instance for this schema.
*ExternalDocumentationObject | externalDocs
| Additional external documentation for this schema.
*string | format
| The extending format for the previously mentioned `type`. See Data Type Formats for further details.
*SchemaObject | items
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.1.
*int | maxProperties
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.1.
*int | minProperties
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.2.
string | name
| the name of this object for documentation and example purposes
bool | nullable = False
| extension that allows types to be nullable
hash< string, SchemaObject > | properties
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.4.
bool | readOnly = False
| Relevant only for Schema `"properties"` definitions. Declares the property as "read only".
const | ReferenceTypes = ...
| valid reference types
hash< string, bool > | required
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.3.
const | ScalarTypes = ...
| valid scalar types
*string | title
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.1.
string | type
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.2.
*XmlObject | xml
| This MAY be used only on properties schemas. It has no effect on root schemas.

## Protected Member Functions

| constructor (string name, hash< auto > oh, SwaggerSchema swagger)
| private constructor; use newSchemaObject() instead
Protected Member Functions inherited from SchemaObject
| check (bool serialize, bool request, string path, string method, string name, reference< auto > value)
| validates the value against the schema definition
constructor(string name, hash< auto > oh, SwaggerSchema swagger, *string hash_str) public auto | getExampleValue ()
| private constructor; use newSchemaObject() instead

## Additional Inherited Members

Public Member Functions inherited from SchemaObject
list< SchemaObject > | allOf ()
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.3.
private | checkIntern (bool serialize, bool request, string type, *string format, string path, string method, string name, hash< auto > v, reference< hash< auto > > value)
| validates a schema object against a value
Static Protected Member Functions inherited from SchemaObject
static | checkValueType (reference< auto > value, string type, *SchemaObject items, *string loc)
| validates default values

## Detailed Description

items schema object for non-body parameters

## Member Function Documentation

## constructor()

ParameterItemsSchemaObject::constructor | ( | string | name,
|  | hash< auto > | oh,
|  | SwaggerSchema | swagger
| ) |  |

protected

private constructor; use newSchemaObject() instead

Parameters

  name | the name of the object
  oh | deserialized hash from the source schema description describing an object in the schema
  swagger | the REST schema for resolving references

Exceptions

  INVALID-FIELD-FORMAT | field has invalid format
  INVALID-FIELD-TYPE | field has invalid type
  INVALID-FIELD-VALUE | field has invalid value
  INVALID-COLLECTION-FORMAT | invalid collectionFormat value
  INVALID-REFERENCE | cannot resolve reference; unknown attributes in description
  REQUIRED-FIELD-MISSING | required field is missing

## newSchemaObject() [1/2]

static ParameterItemsSchemaObject ParameterItemsSchemaObject::newSchemaObject | ( | string | name,
|  | auto | error,
|  | SwaggerSchema | swagger
| ) |  |

static

throws an `"INVALID-FIELD-TYPE"` exception

Exceptions

  INVALID-FIELD-TYPE | due to a type error in the call

## newSchemaObject() [2/2]

static ParameterItemsSchemaObject ParameterItemsSchemaObject::newSchemaObject | ( | string | name,
|  | hash< auto > | oh,
|  | SwaggerSchema | swagger
| ) |  |

static

returns a SchemaObject for the schema definition; resolves references

Parameters

  name | the name of the object
  oh | deserialized hash from the source schema description describing an object in the schema
  swagger | the REST schema for resolving references

Exceptions

  INVALID-FIELD-FORMAT | field has invalid format
  INVALID-FIELD-TYPE | field has invalid type
  INVALID-FIELD-VALUE | field has invalid value
  INVALID-COLLECTION-FORMAT | invalid collectionFormat value
  INVALID-REFERENCE | cannot resolve reference; unknown attributes in description
  REQUIRED-FIELD-MISSING | required field is missing

## Member Data Documentation

## collectionFormat

*string ParameterItemsSchemaObject::collectionFormat

Determines the format of the array if type array is used.

Possible values are:

- `"csv"`: comma separated values; ex: foo,bar
- `"ssv"`: space separated values; ex: foo bar
- `"tsv"`: tab separated values; ex: foo\tbar
- `"pipes"`: pipe separated values; ex: 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"`.