38        string uri_path = 
"/";
 
   44        const ProviderInfo = <DataProviderInfo>{
 
   45            "type": 
"SwaggerDataProvider",
 
   46            "supports_read": False,
 
   47            "supports_create": False,
 
   48            "supports_update": False,
 
   49            "supports_upsert": False,
 
   50            "supports_delete": False,
 
   51            "supports_native_search": False,
 
   52            "supports_bulk_create": False,
 
   53            "supports_bulk_upsert": False,
 
   54            "supports_children": True,
 
   55            "constructor_options": ConstructorOptions,
 
   56            "search_options": NOTHING,
 
   57            "create_options": NOTHING,
 
   58            "upsert_options": NOTHING,
 
   59            "transaction_management": False,
 
   60            "supports_schema": True,
 
   61            "schema_type": 
"swagger",
 
   62            "children_can_support_apis": True,
 
   63            "children_can_support_records": False,
 
   64            "children_can_support_observers": False,
 
   68        const ConstructorOptions = {
 
   69            "lax_parsing": <DataProviderOptionInfo>{
 
   70                "type": AbstractDataProviderTypeMap.
"bool",
 
   71                "desc": 
"If `True` then common errors in Swagger schemas will be ignored; some Swagger schemas with " 
   72                    "errors will be able to be used",
 
   74            "restclient": <DataProviderOptionInfo>{
 
   75                "type": AbstractDataProviderType::get(
new Type(
"RestClient"), NOTHING, {
 
   78                "desc": 
"the RestClient object",
 
   80            "restclient_options": <DataProviderOptionInfo>{
 
   81                "type": AbstractDataProviderType::get(AutoHashType, NOTHING, {
 
   84                "desc": 
"options to the RestClient constructor; only used if a RestClient object is created for a " 
   87            "schema": <DataProviderOptionInfo>{
 
   89                    AbstractDataProviderType::get(StringType, NOTHING, {
 
   91                        DTT_FromLocation: True,
 
   93                    AbstractDataProviderType::get(
new Type(
"SwaggerSchema")),
 
   95                "desc": 
"the Swagger schema object or source URL",
 
   98            "url": <DataProviderOptionInfo>{
 
   99                "type": AbstractDataProviderType::get(StringType, NOTHING, {
 
  100                    DTT_ClientOnly: True,
 
  102                "desc": 
"the URL to the REST server; overrides any URL in the schema or in any RestClient object " 
  103                    "passed as an option",
 
  108        const HttpMethods = {
 
string getName()
Returns the data provider name.
 
hash< DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
 
setSchema(SwaggerSchema schema)
Sets the schema and display name.
 
*list< string > getChildProviderNamesImpl()
Returns a list of child data provider names, if any.
 
checkRestClient(RestClient rest)
Checks the REST client.
 
SwaggerSchema schema
The Swagger schema.
Definition: SwaggerDataProvider.qc.dox.h:32
 
constructor(*hash< auto > options)
Creates the object from constructor options.
 
AbstractDataProvider getChildIntern(string name, *string real_name)
Returns the child provider for the given path component.
 
string display_name
The value to returns as the name of the object.
Definition: SwaggerDataProvider.qc.dox.h:41
 
constructor(SwaggerSchema schema, *RestClient rest)
Creates the object from the arguments.
 
object getSchemaObjectImpl()
Returns the schema supporting this data provider.
 
*AbstractDataProvider getChildProviderImpl(string name)
Returns the given child provider or NOTHING if the given child is unknown.
 
*RestClient rest
The REST client object for API calls.
Definition: SwaggerDataProvider.qc.dox.h:35
 
constructor(hash< auto > path_tree, string uri_path, SwaggerSchema schema, *RestClient rest)
Private constructor; used when traversing the tree.
 
*string getDesc()
Returns the data provider description.
 
hash< auto > path_tree
hash of valid paths
Definition: SwaggerDataProvider.qc.dox.h:118
 
Qore SwaggerDataProvider module definition.
Definition: SwaggerDataProvider.qc.dox.h:26