Qore Swagger Module Reference 2.5
Loading...
Searching...
No Matches
Swagger::BodyParameter Class Reference

AbstractSwaggerParameterObject specialization for "body" parameters. More...

#include <Swagger.qm.dox.h>

Inheritance diagram for Swagger::BodyParameter:
[legend]

Public Member Methods

void check (reference< auto > value, string name, string method, string path, bool serialize, bool request)
 verifies the parameter in an actual REST API call
 
void constructor (hash< auto > oh, SwaggerSchema swagger)
 Constructor.
 
auto getExampleValue (soft< hash< string, bool > > emap, soft< string > fname)
 
string getQoreExample (reference< hash< RestQoreExampleCodeInfo > > rv)
 generates Qore example code for a REST API call
 
soft< RestSchemaValidator::AbstractSchemaObjectgetSchema ()
 Returns the schema for this parameter.
 
- Public Member Methods inherited from Swagger::AbstractSwaggerParameterObject
abstract void check (reference value, string name, string method, string path, bool serialize, bool request)
 verifies the parameter in an actual REST API call
 
void constructor (hash< auto > oh, soft< int > opt_flags)
 Constructor.
 
auto getDefaultValue ()
 returns the default value of the parameter (default: NOTHING)
 
abstract soft< RestSchemaValidator::AbstractSchemaObjectgetSchema ()
 Returns the schema for this parameter, if any.
 
- Public Member Methods inherited from Swagger::ObjectBase
void constructor ()
 Constructor.
 
void constructor (hash< auto > oh)
 Constructor.
 
void constructor (ObjectBase other)
 Copy constructor.
 

Public Attributes

SchemaObject schema
 Required. The schema defining the type used for the body parameter.
 

Additional Inherited Members

- Static Public Member Methods inherited from Swagger::AbstractSwaggerParameterObject
static AbstractSwaggerParameterObject newParameter (SwaggerSchema swagger, string name, hash< auto > oh)
 gets a concrete instance of an AbstractSwaggerParameterObject
 

Detailed Description

AbstractSwaggerParameterObject specialization for "body" parameters.

Member Function Documentation

◆ constructor()

void Swagger::BodyParameter::constructor ( hash< auto >  oh,
SwaggerSchema  swagger 
)

Constructor.

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

◆ getExampleValue()

auto Swagger::BodyParameter::getExampleValue ( soft< hash< string, bool > >  emap,
soft< string >  fname 
)
Parameters
emapa hash to ensure that examples are only produced once
fnameany field context for the value