![]() |
Qore Swagger Module Reference 2.2.3
|
AbstractParameterObject specialization for parameters other than "body"
and "formData"
More...
#include <Swagger.qm.dox.h>
Public Member Methods | |
constructor (string name, hash< auto > oh, SwaggerSchema swagger) | |
Constructor. | |
![]() | |
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) | |
Creates the object. | |
auto | getDefaultValue () |
returns the default value of the parameter (default: NOTHING) | |
auto | getExampleValue (*hash< string, bool > emap, *string fname) |
returns an example value of the parameter (default: NOTHING) | |
![]() | |
abstract | check (bool serialize, bool request, string path, string method, string name, reference value) |
verifies the parameter in an actual REST API call | |
constructor (hash< auto > oh, *int opt_flags) | |
Constructor. | |
auto | getDefaultValue () |
returns the default value of the parameter (default: NOTHING) | |
![]() | |
constructor () | |
Constructor. | |
constructor (hash< auto > oh) | |
Constructor. | |
constructor (ObjectBase other) | |
copy constructor | |
initialize (hash< auto > oh) | |
Initialize. | |
![]() | |
constructor (SchemaBase other) | |
Copy constructor. | |
constructor (string objType, hash< auto > oh) | |
Constructor. | |
Public Attributes | |
const | ParameterTypes = SchemaObject::ScalarTypes |
valid parameter types | |
![]() | |
bool | allowEmptyValue = False |
Sets the ability to pass empty-valued parameters. | |
*string | collectionFormat |
Determines the format of the array if type array is used. | |
auto | defaultVal |
Declares the value of the parameter that the server will use if none is provided. | |
*string | format |
The extending format for the previously mentioned type . See Data Type Formats for further details. | |
*ParameterItemsSchemaObject | items |
Required if type is "array" . Describes the type of items in the array. | |
string | type |
Required. The type of the parameter. | |
![]() | |
*string | desc |
A brief description of the parameter. This could contain examples of use. GFM syntax can be used for rich text representation. | |
string | inLoc |
Required. The location of the parameter. | |
string | name |
Required. The name of the parameter. Parameter names are case sensitive. | |
bool | required = False |
Determines whether this parameter is mandatory. | |
![]() | |
hash< auto > | vendorExtensions |
Allows extensions to the Swagger Schema. | |
![]() | |
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. | |
*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 Methods | |
setType (SwaggerSchema swagger) | |
Sets the parameter type. | |
![]() | |
abstract | setType (SwaggerSchema swagger) |
Sets the parameter type. | |
![]() | |
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 | |
auto | getExampleValueWithFormat (string type, *string format, *string fname) |
returns an example value for the given type | |
Additional Inherited Members | |
![]() | |
static AbstractParameterObject | newParameter (string name, hash< auto > oh, SwaggerSchema swagger) |
gets a concrete instance of an AbstractParameterObject | |
![]() | |
static bool | checkValueType (reference< auto > value, string type) |
Checks the value against the type. | |
![]() | |
static | checkValueType (reference< auto > value, string type, *SchemaObject items, *string loc) |
validates default values | |
![]() | |
static | throwInvalidType (string name, string actual, string expected, auto value) |
throws an SCHEMA-VALIDATION-ERROR exception | |
AbstractParameterObject specialization for parameters other than "body"
and "formData"
Swagger::OtherParameter::constructor | ( | string | name, |
hash< auto > | oh, | ||
SwaggerSchema | swagger | ||
) |
Constructor.
name | the parameter name |
oh | deserialized hash from the source schema description describing general parameters (other than "body" parameters) |
swagger | the REST schema for resolving references |
INVALID-FIELD-TYPE | field has invalid type |
INVALID-FIELD-VALUE | field has invalid value |
REQUIRED-FIELD-MISSING | required field is missing |