Qore Swagger Module Reference 2.0.10
|
AbstractParameterObject specialization for parameters other than "body"
.
More...
#include <Swagger.qm.dox.h>
Public Member Methods | |
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) | |
Constructor. More... | |
auto | getDefaultValue () |
returns the default value of the parameter (default: NOTHING) | |
auto | getExampleValue () |
returns an example value of the parameter (default: NOTHING) | |
Public Member Methods inherited from Swagger::AbstractParameterObject | |
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) | |
Constructor. More... | |
auto | getDefaultValue () |
returns the default value of the parameter (default: NOTHING) | |
Public Member Methods inherited from Swagger::ObjectBase | |
constructor () | |
Constructor. | |
constructor (hash< auto > oh) | |
Constructor. More... | |
constructor (ObjectBase other) | |
copy constructor | |
initialize (hash< auto > oh) | |
Initialize. More... | |
Public Member Methods inherited from Swagger::SchemaBase | |
private | 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 | |
private | checkArrayParam (bool serialize, bool request, SchemaObject items, string path, string method, string name, reference< softlist< auto > > value) |
validates the value against the schema definition | |
private | 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 | |
private | checkIntern (bool serialize, bool request, string type, *string format, string path, string method, string name, string v, reference< auto > value) |
validates string values | |
constructor (SchemaBase other) | |
Copy constructor. | |
constructor (string objType, hash< auto > oh) | |
Constructor. More... | |
Public Attributes | |
bool | allowEmptyValue = False |
Sets the ability to pass empty-valued parameters. More... | |
*string | collectionFormat |
Determines the format of the array if type array is used. More... | |
auto | defaultVal |
Declares the value of the parameter that the server will use if none is provided. More... | |
*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. | |
const | ParameterTypes = ... |
valid parameter types | |
string | type |
Required. The type of the parameter. More... | |
Public Attributes inherited from Swagger::AbstractParameterObject | |
*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. More... | |
string | name |
Required. The name of the parameter. Parameter names are case sensitive. More... | |
bool | required = False |
Determines whether this parameter is mandatory. More... | |
Public Attributes inherited from Swagger::ObjectBase | |
hash< auto > | 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. | |
Static Private Member Methods | |
static | checkValueType (reference< auto > value, string type, *SchemaObject items, *string loc) |
validates default values | |
Static Private Member Methods inherited from Swagger::SchemaBase | |
static | throwInvalidType (string name, string actual, string expected, auto value) |
throws an SCHEMA-VALIDATION-ERROR exception | |
Additional Inherited Members | |
Static Public Member Methods inherited from Swagger::AbstractParameterObject | |
static AbstractParameterObject | newParameter (string name, hash< auto > oh, SwaggerSchema swagger) |
gets a concrete instance of an AbstractParameterObject | |
Static Public Member Methods inherited from Swagger::SchemaBase | |
static bool | checkValueType (reference< auto > value, string type) |
Checks the value against the type. More... | |
Private Member Methods inherited from Swagger::SchemaBase | |
checkIntern (bool serialize, bool request, string type, *string format, string path, string method, string name, date v, reference value) | |
converts strings to/from date/time values for supported formats | |
auto | getExampleValue (string type, *string format) |
returns an example value for the given type | |
AbstractParameterObject specialization for parameters other than "body"
.
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 |
bool Swagger::OtherParameter::allowEmptyValue = False |
Sets the ability to pass empty-valued parameters.
This is valid only for either query
or formData
parameters and allows you to send a parameter with a name only or an empty value. Default value is false
.
*string Swagger::OtherParameter::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"
.
auto Swagger::OtherParameter::defaultVal |
Declares the value of the parameter that the server will use if none is provided.
For example a "count" to control the number of results per page might default to 100 if not supplied by the client in the request. (Note: "default" has no meaning for required parameters.) 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 this parameter.
string Swagger::OtherParameter::type |
Required. The type of the parameter.
Since the parameter is not located at the request body, it is limited to simple types (that is, not an object). The value MUST be one of "string"
, "number"
, "integer"
, "boolean"
, "array"
or "file"
. If type
is "file"
, the consumes MUST be either "multipart/form-data"
, " application/x-www-form-urlencoded"
or both and the parameter MUST be in "formData"
.