Qore Swagger Module Reference  1.0.1
Swagger::ParameterItemsSchemaObject Class Reference

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

Inheritance diagram for Swagger::ParameterItemsSchemaObject:

Static Public Member Functions

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

Public Attributes

*string collectionFormat
 Determines the format of the array if type array is used. More...
 
- Public Attributes inherited from Swagger::SchemaObject
auto additionalProperties
 See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.4. More...
 
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. More...
 
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
 
hash< string, SchemaObjectproperties
 See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.4. More...
 
bool readOnly = False
 Relevant only for Schema "properties" definitions. Declares the property as "read only". More...
 
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. More...
 
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. More...
 
*XmlObject xml
 This MAY be used only on properties schemas. It has no effect on root schemas. More...
 
- Public Attributes inherited from Swagger::ObjectBase
hash vendorExtensions
 Allows extensions to the Swagger Schema. More...
 
- 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. More...
 
*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.
 
*float 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.
 
*float 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.
 

Private Member Functions

 constructor (string name, hash oh, SwaggerSchema swagger)
 private constructor; use newSchemaObject() instead More...
 

Additional Inherited Members

- Public Member Functions inherited from Swagger::SchemaObject
list< SchemaObjectallOf ()
 See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.3. More...
 
 check (bool serialize, bool request, string path, string method, string name, reference value)
 validates the value against the schema definition
 
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 oh)
 Constructor. More...
 
 constructor (ObjectBase other)
 copy constructor
 
 initialize (hash oh)
 Initialize. More...
 
- Public Member Functions inherited from Swagger::SchemaBase
 constructor (string objType, hash oh)
 Constructor. More...
 
 constructor (SchemaBase other)
 Copy constructor.
 

Detailed Description

items schema object for non-body parameters

Member Function Documentation

◆ constructor()

Swagger::ParameterItemsSchemaObject::constructor ( string  name,
hash  oh,
SwaggerSchema  swagger 
)
private

private constructor; use newSchemaObject() instead

Parameters
namethe name of the object
ohdeserialized hash from the source schema description describing an object in the schema
swaggerthe REST schema for resolving references
Exceptions
INVALID-FIELD-FORMATfield has invalid format
INVALID-FIELD-TYPEfield has invalid type
INVALID-FIELD-VALUEfield has invalid value
INVALID-COLLECTION-FORMATinvalid collectionFormat value
INVALID-REFERENCEcannot resolve reference; unknown attributes in description
REQUIRED-FIELD-MISSINGrequired field is missing

◆ newSchemaObject() [1/2]

static ParameterItemsSchemaObject Swagger::ParameterItemsSchemaObject::newSchemaObject ( string  name,
hash  oh,
SwaggerSchema  swagger 
)
static

returns a SchemaObject for the schema definition; resolves references

Parameters
namethe name of the object
ohdeserialized hash from the source schema description describing an object in the schema
swaggerthe REST schema for resolving references
Exceptions
INVALID-FIELD-FORMATfield has invalid format
INVALID-FIELD-TYPEfield has invalid type
INVALID-FIELD-VALUEfield has invalid value
INVALID-COLLECTION-FORMATinvalid collectionFormat value
INVALID-REFERENCEcannot resolve reference; unknown attributes in description
REQUIRED-FIELD-MISSINGrequired field is missing

◆ newSchemaObject() [2/2]

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

throws an "INVALID-FIELD-TYPE" exception

Exceptions
INVALID-FIELD-TYPEdue to a type error in the call

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".