Qore SwaggerDataProvider Module Reference 1.3
Loading...
Searching...
No Matches
SwaggerDataProviderBase.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
26namespace SwaggerDataProvider {
29
30public:
33
34
37
38
40protected:
41 hash<DataProviderInfo> getStaticInfoImpl();
42public:
43
44
46protected:
47 addFieldsFromParameters(HashDataType rv, hash<string, AbstractParameterObject> parameters, reference<bool> required);
48public:
49
50
52protected:
53 AbstractDataField getFieldFromSchema(string name, *string desc, SchemaObject schema, bool required = True);
54public:
55
56
58protected:
59 AbstractDataField getFieldFromSchemaIntern(string path, string name, *string desc, SchemaObject schema, bool required = True);
60public:
61
62
64protected:
65 AbstractDataProviderType getSchemaDataType(string path, SchemaObject schema, bool required = True);
66public:
67
68
70protected:
71 AbstractDataField getFieldFromParameter(string path, string name, string type, *string format, *SchemaObject arrayItems, *string desc, bool required, *list<auto> allowed_values);
72public:
73
74
76protected:
77 AbstractDataProviderType getType(string path, string typestr, *string format, *SchemaObject arrayItems, bool required = True);
78public:
79
80
82protected:
83 AbstractDataField getFieldForHeaders(string name, hash<auto> headers);
84public:
85
86};
87};
88
89namespace Priv {
90const RecursiveKey = "__swagger_dp_rec_key$$";
91
92class RecursiveFieldHelper {
93
94public:
95protected:
96 *hash<auto> tld = get_thread_data(RecursiveKey);
97 string hash_str;
98 string ptype;
99 string name;
100 *QoreDataField f;
101
102public:
103
104 constructor(object obj, string ptype, string name);
105
106
107 *QoreDataField get();
108
109
110 QoreDataField set(QoreDataField new_field);
111
112};
113
114class RecursiveTypeHelper {
115
116public:
117protected:
118 *hash<auto> tld = get_thread_data(RecursiveKey);
119 string hash_str;
120 *AbstractDataProviderType t;
121
122public:
123
124 constructor(object obj, string hash_str);
125
126
127 *AbstractDataProviderType get();
128
129
130 AbstractDataProviderType set(AbstractDataProviderType new_type);
131
132};
133
134class RecursiveSearchHelper {
135
136public:
137 destructor();
138
139};
140};
The Swagger data provider base class.
Definition: SwaggerDataProviderBase.qc.dox.h:28
AbstractDataProviderType getType(string path, string typestr, *string format, *SchemaObject arrayItems, bool required=True)
Returns the data type corresponding to the values.
AbstractDataField getFieldForHeaders(string name, hash< auto > headers)
Returns a field of header fields.
AbstractDataProviderType getSchemaDataType(string path, SchemaObject schema, bool required=True)
Returns the data type for the given schema.
AbstractDataField getFieldFromSchemaIntern(string path, string name, *string desc, SchemaObject schema, bool required=True)
Returns a field definition from the Swagger parameter.
AbstractDataField getFieldFromParameter(string path, string name, string type, *string format, *SchemaObject arrayItems, *string desc, bool required, *list< auto > allowed_values)
Returns a field from a Swagger parameter.
AbstractDataField getFieldFromSchema(string name, *string desc, SchemaObject schema, bool required=True)
Returns a field definition from the Swagger parameter.
constructor(RestClient::RestClient rest)
Creates the object.
addFieldsFromParameters(HashDataType rv, hash< string, AbstractParameterObject > parameters, reference< bool > required)
Returns a field definition from Swagger parameters.
hash< DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
The Swagger data provider common base class.
Definition: SwaggerDataProviderCommon.qc.dox.h:28
SwaggerSchema schema
The Swagger schema.
Definition: SwaggerDataProviderCommon.qc.dox.h:33
*RestClient::RestClient rest
The REST client object for API calls.
Definition: SwaggerDataProviderCommon.qc.dox.h:36
auto get_thread_data(string key)
Qore SwaggerDataProvider module definition.
Definition: SwaggerDataProvider.qc.dox.h:26