32 string uri_path =
"/";
38 const ProviderInfo = <DataProviderInfo>{
39 "type":
"SwaggerDataProvider",
40 "supports_read": False,
41 "supports_create": False,
42 "supports_update": False,
43 "supports_upsert": False,
44 "supports_delete": False,
45 "supports_native_search": False,
46 "supports_bulk_create": False,
47 "supports_bulk_upsert": False,
48 "supports_children": True,
49 "constructor_options": ConstructorOptions,
50 "search_options": NOTHING,
51 "create_options": NOTHING,
52 "upsert_options": NOTHING,
53 "transaction_management": False,
54 "supports_schema": True,
55 "schema_type":
"swagger",
56 "children_can_support_apis": True,
57 "children_can_support_records": False,
58 "children_can_support_observers": False,
62 const ConstructorOptions = {
63 "lax_parsing": <DataProviderOptionInfo>{
64 "type": AbstractDataProviderTypeMap.
"bool",
65 "desc":
"If `True` then common errors in Swagger schemas will be ignored; some Swagger schemas with "
66 "errors will be able to be used",
68 "restclient": <DataProviderOptionInfo>{
69 "type": AbstractDataProviderType::get(
new Type(
"RestClient"), NOTHING, {
72 "desc":
"the RestClient object",
74 "restclient_options": <DataProviderOptionInfo>{
75 "type": AbstractDataProviderType::get(AutoHashType, NOTHING, {
78 "desc":
"options to the RestClient constructor; only used if a RestClient object is created for a "
81 "schema": <DataProviderOptionInfo>{
83 AbstractDataProviderType::get(StringType, NOTHING, {
85 DTT_FromLocation: True,
87 AbstractDataProviderType::get(
new Type(
"SwaggerSchema")),
89 "desc":
"the Swagger schema object or source URL",
92 "url": <DataProviderOptionInfo>{
93 "type": AbstractDataProviderType::get(StringType, NOTHING, {
96 "desc":
"the URL to the REST server; overrides any URL in the schema or in any RestClient object "
97 "passed as an option",
102 const HttpMethods = {
The Swagger data provider common base class.
Definition: SwaggerDataProviderCommon.qc.dox.h:28
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.
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:35
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.
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:112
Qore SwaggerDataProvider module definition.
Definition: SwaggerDataProvider.qc.dox.h:26