SwaggerRequestDataProvider.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
namespace SwaggerDataProvider {
class SwaggerRequestDataProvider : public SwaggerDataProviderBase {
public:
SwaggerSchema schema;
*RestClient rest;
string uri_path;
bool resolve_uri;
PathItemObject pio;
OperationObject op;
string success_response;
*hash<string, AbstractDataField> record_type;
constructor(SwaggerSchema schema, *RestClient rest, string uri_path, PathItemObject pio, OperationObject op);
string getName();
hash<DataProviderInfo> getInfo();
protected:
*hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
public:
protected:
*hash<string, AbstractDataField> getRecordTypeIntern();
public:
protected:
*AbstractDataProviderType getRequestTypeImpl();
public:
protected:
*AbstractDataProviderType getResponseTypeImpl();
public:
protected:
*hash<string, AbstractDataProviderType> getErrorResponseTypesImpl();
public:
protected:
AbstractDataProviderType getErrorResponseTypeImpl(string error_code);
public:
protected:
AbstractDataProviderType getResponseTypeIntern(ResponseObject response, string label);
public:
protected:
*ResponseObject getSuccessResponse();
public:
protected:
auto doRequestImpl(auto req, *hash<auto> request_options);
public:
protected:
AbstractDataProviderRecordIterator requestSearchRecordsImpl(auto req, *hash<auto> where_cond, *hash<auto> search_options);
public:
protected:
hash<auto> doRequestIntern(auto req, *hash<auto> options);
public:
string getUriValue(auto v);
protected:
string getUriPath();
public:
protected:
RestClient getRestClient();
public:
protected:
hash<DataProviderInfo> getStaticInfoImpl();
public:
};
};
SwaggerDataProvider::SwaggerDataProviderBase
The Swagger data provider base class.
Definition: SwaggerDataProviderBase.qc.dox.h:28
SwaggerDataProvider::SwaggerRequestDataProvider
The Swagger data provider class.
Definition: SwaggerRequestDataProvider.qc.dox.h:28
SwaggerDataProvider::SwaggerRequestDataProvider::requestSearchRecordsImpl
AbstractDataProviderRecordIterator requestSearchRecordsImpl(auto req, *hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
SwaggerDataProvider::SwaggerRequestDataProvider::getErrorResponseTypeImpl
AbstractDataProviderType getErrorResponseTypeImpl(string error_code)
Returns the type for the given error code.
SwaggerDataProvider::SwaggerRequestDataProvider::doRequestImpl
auto doRequestImpl(auto req, *hash< auto > request_options)
Makes a request and returned the response.
SwaggerDataProvider::SwaggerRequestDataProvider::getStaticInfoImpl
hash< DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
SwaggerDataProvider::SwaggerRequestDataProvider::getResponseTypeIntern
AbstractDataProviderType getResponseTypeIntern(ResponseObject response, string label)
Returns a data provider type object for a Swagger response.
SwaggerDataProvider::SwaggerRequestDataProvider::uri_path
string uri_path
The current URI path.
Definition: SwaggerRequestDataProvider.qc.dox.h:38
SwaggerDataProvider::SwaggerRequestDataProvider::pio
PathItemObject pio
The path item object for the operation.
Definition: SwaggerRequestDataProvider.qc.dox.h:44
SwaggerDataProvider::SwaggerRequestDataProvider::getUriPath
string getUriPath()
Returns the URI path to use in requests.
SwaggerDataProvider::SwaggerRequestDataProvider::getRequestTypeImpl
*AbstractDataProviderType getRequestTypeImpl()
Returns the description of a successful request message, if any.
SwaggerDataProvider::SwaggerRequestDataProvider::getInfo
hash< DataProviderInfo > getInfo()
Returns data provider info.
SwaggerDataProvider::SwaggerRequestDataProvider::op
OperationObject op
The operation object.
Definition: SwaggerRequestDataProvider.qc.dox.h:47
SwaggerDataProvider::SwaggerRequestDataProvider::rest
*RestClient rest
The REST client object for API calls.
Definition: SwaggerRequestDataProvider.qc.dox.h:35
SwaggerDataProvider::SwaggerRequestDataProvider::getErrorResponseTypesImpl
*hash< string, AbstractDataProviderType > getErrorResponseTypesImpl()
Returns a hash of error responses, if any.
SwaggerDataProvider::SwaggerRequestDataProvider::getName
string getName()
Returns the data provider name.
SwaggerDataProvider::SwaggerRequestDataProvider::schema
SwaggerSchema schema
The Swagger schema.
Definition: SwaggerRequestDataProvider.qc.dox.h:32
SwaggerDataProvider::SwaggerRequestDataProvider::constructor
constructor(SwaggerSchema schema, *RestClient rest, string uri_path, PathItemObject pio, OperationObject op)
Creates the object from the arguments.
SwaggerDataProvider::SwaggerRequestDataProvider::getResponseTypeImpl
*AbstractDataProviderType getResponseTypeImpl()
Returns the description of a successful response message, if any.
SwaggerDataProvider::SwaggerRequestDataProvider::success_response
string success_response
The success response code, if any.
Definition: SwaggerRequestDataProvider.qc.dox.h:50
SwaggerDataProvider::SwaggerRequestDataProvider::getRestClient
RestClient getRestClient()
Returns a REST client for HTTP operations.
SwaggerDataProvider::SwaggerRequestDataProvider::getRecordTypeImpl
*hash< string, AbstractDataField > getRecordTypeImpl(*hash< auto > search_options)
Returns the description of the record type, if any.
SwaggerDataProvider::SwaggerRequestDataProvider::getSuccessResponse
*ResponseObject getSuccessResponse()
Returns the schema for the first successful response message found.
SwaggerDataProvider::SwaggerRequestDataProvider::record_type
*hash< string, AbstractDataField > record_type
If the request supports a list of hashes in the response and therefore the record API.
Definition: SwaggerRequestDataProvider.qc.dox.h:53
SwaggerDataProvider::SwaggerRequestDataProvider::doRequestIntern
hash< auto > doRequestIntern(auto req, *hash< auto > options)
Makes a REST request and returns the response.
SwaggerDataProvider::SwaggerRequestDataProvider::getUriValue
string getUriValue(auto v)
Returns the value for the given query argument.
SwaggerDataProvider::SwaggerRequestDataProvider::resolve_uri
bool resolve_uri
The URI needs dynamic resolution.
Definition: SwaggerRequestDataProvider.qc.dox.h:41
RestClient
SwaggerDataProvider
Qore SwaggerDataProvider module definition.
Definition: SwaggerDataProvider.qc.dox.h:26