| Qore Swagger Module Reference 2.2.3

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Swagger::ParameterItemsSchemaObject Class Reference

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

Inheritance diagram for Swagger::ParameterItemsSchemaObject:
[legend]

## Public Member Functions
| constructor (SchemaObject o)
| Copy constructor.
Public Member Functions inherited from Swagger::SchemaObject
list< SchemaObject > | allOf ()
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.3.
| check (bool serialize, bool request, string path, string method, string name, reference< auto > value)
| validates the value against the schema definition
AbstractDataField | getField (string name, *string desc, bool required=True, *HTTPClient rest, auto default_value)
| Returns a field definition from the Swagger parameter.
AbstractDataField | getField (string path, string name, *string desc, bool required=True, *HTTPClient rest, auto default_value)
| Returns a field definition from the Swagger parameter.
string | getQoreExample (reference< hash< RestQoreExampleCodeInfo > > rv, string name, bool decl)
| returns example Qore code for the object
Public Member Functions inherited from Swagger::ObjectBase
| constructor ()
| Constructor.
| constructor (hash< auto > oh)
| Constructor.
| constructor (ObjectBase other)
| copy constructor
| initialize (hash< auto > oh)
| Initialize.
Public Member Functions inherited from Swagger::SchemaBase
| constructor (SchemaBase other)
| Copy constructor.
| constructor (string objType, hash< auto > oh)
| Constructor.

## Static Public Member Functions
static ParameterItemsSchemaObject | newSchemaObject (string name, auto error, SwaggerSchema swagger, *string inLoc)
| throws an `"INVALID-FIELD-TYPE"` exception
static ParameterItemsSchemaObject | newSchemaObject (string name, hash< auto > oh, SwaggerSchema swagger, *string inLoc)
| returns a SchemaObject for the schema definition; resolves references
Static Public Member Functions inherited from Swagger::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, *bool require_items)
| returns a SchemaObject for the schema definition; resolves references
Static Public Member Functions inherited from Swagger::SchemaBase
static bool | checkValueType (reference< auto > value, string type)
| Checks the value against the type.

## Public Attributes
*string | collectionFormat
| Determines the format of the array if type array is used.
Public Attributes inherited from Swagger::SchemaObject
auto | additionalProperties
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.4.
*AbstractDataProviderType | dataType
| The data type of the schema (required)
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, bool > | nullable_properties
| extention to allow properties to be nullable
*AbstractDataProviderType | orNothingDataType
| The data type of the schema (not required)
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.
Public Attributes inherited from Swagger::ObjectBase
hash< auto > | vendorExtensions
| Allows extensions to the Swagger Schema.
Public Attributes inherited from Swagger::SchemaBase
hash< string, bool > | enum
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1.
*bool | exclusiveMax
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2.
*bool | exclusiveMin
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3.
*softfloat | maximum
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2.
*int | maxItems
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.2.
*int | maxLength
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.1.
*softfloat | minimum
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3.
*int | minItems
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.3.
*int | minLength
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.2.
*float | multipleOf
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.1.
*string | pattern
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
*bool | uniqueItems
| See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.4.

## Protected Member Functions
| constructor (string name, hash< auto > oh, SwaggerSchema swagger, *string inLoc)
| private constructor; use newSchemaObject() instead
Protected Member Functions inherited from Swagger::SchemaObject
| checkIntern (bool serialize, bool request, string type, *string format, string path, string method, string name, hash< auto > v, reference< hash< auto > > value, *bool no_check_others)
| validates a schema object against a value
| constructor (SchemaObject o)
| Private copy constructor.
| constructor (string name, hash< auto > oh, SwaggerSchema swagger, *string hash_str, *bool require_items)
| private constructor; use newSchemaObject() instead
AbstractDataProviderType | getDataTypeIntern (string path, bool required=True, *HTTPClient rest)
| Returns the data type for the given schema.
AbstractDataField | getFieldIntern (string path, string name, *string desc, bool required=True, *HTTPClient rest, auto default_value, *string rstr)
| Returns a field definition from the Swagger parameter.
| getSchemaObjectFields (HashDataType type, string path, auto def_body)
| Sets fields of a schema object.
Protected Member Functions inherited from Swagger::SchemaBase
| check (bool serialize, bool request, string type, *string format, *SchemaObject items, string path, string method, string name, reference< auto > value)
| validates the value against the schema definition
| checkArrayParam (bool serialize, bool request, SchemaObject items, string path, string method, string name, reference< list< auto > > value)
| validates the value against the schema definition
| checkIntern (bool serialize, bool request, string type, *string format, string path, string method, string name, binary v, reference value)
| converts binary values to strings for supported formats
| checkIntern (bool serialize, bool request, string type, *string format, string path, string method, string name, date v, reference< auto > value)
| converts dates to/from string or int values for supported formats
| checkIntern (bool serialize, bool request, string type, *string format, string path, string method, string name, string v, reference< auto > value)
| validates string values
| constructor ()
| Private constructor.
auto | getExampleValueWithFormat (string type, *string format, *string fname)
| returns an example value for the given type

## Additional Inherited Members
Static Protected Member Functions inherited from Swagger::SchemaObject
static | checkValueType (reference< auto > value, string type, *SchemaObject items, *string loc)
| validates default values
static *AbstractDataField | getCacheField (reference< hash< string, AbstractDataField > > h, string key)
| Returns a field object from the given cache.
Static Protected Member Functions inherited from Swagger::SchemaBase
static | throwInvalidType (string name, string actual, string expected, auto value)
| throws an `SCHEMA-VALIDATION-ERROR` exception

## Detailed Description

items schema object for non-body parameters

## Member Function Documentation

## ◆ constructor()

Swagger::ParameterItemsSchemaObject::constructor | ( | string | name,
|  | hash< auto > | oh,
|  | SwaggerSchema | swagger,
|  | *string | inLoc )
| 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 Swagger::ParameterItemsSchemaObject::newSchemaObject | ( | string | name,
|  | auto | error,
|  | SwaggerSchema | swagger,
|  | *string | inLoc )
| static

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

Exceptions

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

## ◆ newSchemaObject() [2/2]

static ParameterItemsSchemaObject Swagger::ParameterItemsSchemaObject::newSchemaObject | ( | string | name,
|  | hash< auto > | oh,
|  | SwaggerSchema | swagger,
|  | *string | inLoc )
| 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 Swagger::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"`.