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,
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 "schema": <DataProviderOptionInfo>{
71 AbstractDataProviderType::get(StringType,
NOTHING, {
73 DTT_FromLocation:
True,
75 AbstractDataProviderType::get(
new Type(
"SwaggerSchema")),
77 "desc":
"the Swagger schema object or source URL",
80 "restclient": <DataProviderOptionInfo>{
81 "type": AbstractDataProviderType::get(
new Type(
"RestClient"),
NOTHING, {
84 "desc":
"the RestClient object",
86 "url": <DataProviderOptionInfo>{
87 "type": AbstractDataProviderType::get(StringType,
NOTHING, {
90 "desc":
"the URL to the REST server; overrides any URL in the schema or in any RestClient object "
91 "passed as an option",
93 "restclient_options": <DataProviderOptionInfo>{
94 "type": AbstractDataProviderType::get(AutoHashType,
NOTHING, {
97 "desc":
"options to the RestClient constructor; only used if a RestClient object is created for a "
103 const HttpMethods = {
hash< DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
string getName()
Returns the data provider name.
setSchema(SwaggerSchema schema)
Sets the schema and display name.
checkRestClient(RestClient rest)
Checks the REST client.
SwaggerSchema schema
The Swagger schema.
Definition: SwaggerDataProvider.qc.dox.h:32
*list< string > getChildProviderNamesImpl()
Returns a list of child data provider names, if any.
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:113
Qore SwaggerDataProvider module definition.
Definition: SwaggerDataProvider.qc.dox.h:26