Qore Swagger Module Reference 2.1.1
Loading...
Searching...
No Matches
HeaderObject Class Reference

describes a single HTTP header More...

Inherits ObjectBase, and SchemaBase.

Public Member Functions

 constructor (hash< auto > oh, SwaggerSchema swagger)
 Constructor.
 

Public Attributes

*string collectionFormat
 Determines the format of the array if type array is used.
 
auto defaultVal
 Declares the value of the header that the server will use if none is provided.
 
*string desc
 A short description of the header.
 
*string format
 The extending format for the previously mentioned type. See Data Type Formats for further details.
 
*SchemaObject items
 Required if type is "array". Describes the type of items in the array.
 
string type
 Required. The type of the object.
 

Static Protected Member Functions

static checkValueType (reference< auto > value, string type, *SchemaObject items, *string loc)
 validates default values
 

Detailed Description

describes a single HTTP header

Member Function Documentation

◆ constructor()

HeaderObject::constructor ( hash< auto >  oh,
SwaggerSchema  swagger 
)

Constructor.

Parameters
ohdeserialized hash from the source schema description describing a single HTTP header
swaggerthe REST schema for resolving references
Exceptions
INVALID-FIELD-TYPEfield has invalid type
INVALID-FIELD-VALUEfield has invalid value
REQUIRED-FIELD-MISSINGrequired field is missing

Member Data Documentation

◆ collectionFormat

*string HeaderObject::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

Default value is "csv".

◆ defaultVal

auto HeaderObject::defaultVal

Declares the value of the header that the server will use if none is provided.

(Note: "default" has no meaning for required headers.) See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. Unlike JSON Schema this value MUST conform to the defined type for the header.

◆ type

string HeaderObject::type

Required. The type of the object.

The value MUST be one of "string", "number", "integer", "boolean", or "array".