![]() |
Qore SwaggerDataProvider Module Reference 1.3
|
The Swagger data provider class. More...
#include <SwaggerRequestDataProvider.qc.dox.h>
Public Member Methods | |
constructor (SwaggerSchema schema, *RestClient rest, string uri_path, PathItemObject pio, OperationObject op) | |
Creates the object from the arguments. | |
disableRequestTypeCheck () | |
Disable the request type check. | |
auto | doRequest (auto req, *hash< auto > request_options) |
Makes a request and returns the response. | |
*string | getDesc () |
Returns the data provider description. | |
hash< DataProviderInfo > | getInfo () |
Returns data provider info. | |
string | getName () |
Returns the data provider name. | |
string | getUriValue (auto v) |
Returns the value for the given query argument. | |
![]() | |
constructor () | |
Creates the object. | |
constructor (RestClient::RestClient rest) | |
Creates the object. | |
![]() | |
constructor () | |
Creates the object. | |
constructor (RestClient::RestClient rest) | |
Creates the object. | |
SwaggerSchema | getSchema () |
Returns the Swagger schema. | |
setLogger (*LoggerInterface logger) | |
Accepts a LoggerInterface object for logging (or clears it) | |
setRestClient (RestClient::RestClient rest) | |
Sets the RestClient. | |
*RestClient::RestClient | tryGetRestClient () |
Returns the RestClient. | |
Private Member Methods | |
auto | doRequestImpl (auto req, *hash< auto > request_options) |
Makes a request and returned the response. | |
*hash< auto > | doRequestIntern (auto req, *hash< auto > options) |
Makes a REST request and returns the response. | |
AbstractDataProviderType | getErrorResponseTypeImpl (string error_code) |
Returns the type for the given error code. | |
*hash< string, AbstractDataProviderType > | getErrorResponseTypesImpl () |
Returns a hash of error responses, if any. | |
*hash< string, AbstractDataField > | getRecordTypeImpl (*hash< auto > search_options) |
Returns the description of the record type, if any. | |
*AbstractDataProviderType | getRequestTypeImpl () |
Returns the description of a successful request message, if any. | |
*AbstractDataProviderType | getResponseTypeImpl () |
Returns the description of a successful response message, if any. | |
AbstractDataProviderType | getResponseTypeIntern (ResponseObject response, string label) |
Returns a data provider type object for a Swagger response. | |
RestClient | getRestClient () |
Returns a REST client for HTTP operations. | |
hash< DataProviderInfo > | getStaticInfoImpl () |
Returns data provider static info. | |
*ResponseObject | getSuccessResponse () |
Returns the schema for the first successful response message found. | |
string | getUriPath () |
Returns the URI path to use in requests. | |
AbstractDataProviderRecordIterator | requestSearchRecordsImpl (auto req, *hash< DataProviderExpression > where_cond, *hash< auto > search_options) |
Returns an iterator for zero or more records matching the search options. | |
AbstractDataProviderRecordIterator | requestSearchRecordsImpl (auto req, *hash< auto > where_cond, *hash< auto > search_options) |
Returns an iterator for zero or more records matching the search options. | |
![]() | |
hash< DataProviderInfo > | getStaticInfoImpl () |
Returns data provider static info. | |
Private Attributes | |
bool | disable_request_type_check |
Disable checking the request type. | |
![]() | |
*RestClient::RestClient | rest |
The REST client object for API calls. | |
SwaggerSchema | schema |
The Swagger schema. | |
The Swagger data provider class.
auto SwaggerDataProvider::SwaggerRequestDataProvider::doRequest | ( | auto | req, |
*hash< auto > | request_options | ||
) |
Makes a request and returns the response.
req | the request to serialize and make according to the request type |
request_options | the request options; will be processed by validateRequestOptions() |
INVALID-OPERATION | the data provider does not support the request API |
INVALID-REQUEST | the request argument provided do not match the expected request type |
|
private |
Makes a request and returned the response.
req | the request to serialize and make according to the request type |
request_options | the request options; will be processed by validateRequestOptions() |
|
private |
Returns the type for the given error code.
error_code | the error code for the response; must be a known error code, or an UNKNOWN-ERROR-RESPONSE exception is thrown |
UNKNOWN-ERROR-RESPONSE | the error response given is not known |
|
private |
Returns the description of the record type, if any.
Returns the record type description for any successful response
|
private |
Returns an iterator for zero or more records matching the search options.
req | the request to serialize and make according to the request type |
where_cond | the search criteria |
search_options | the search options after processing by validateSearchOptions() |
This will execute the request and perform a default search on any record(s) returned
SWAGGER-SEARCH-ERROR | the response type is not list or hash and does not support searching |
|
private |
Returns an iterator for zero or more records matching the search options.
req | the request to serialize and make according to the request type |
where_cond | the search criteria |
search_options | the search options after processing by validateSearchOptions() |
This will execute the request and perform a default search on any record(s) returned
SWAGGER-SEARCH-ERROR | the response type is not list or hash and does not support searching |