robotframework-openapitools 0.2.1__py3-none-any.whl → 0.2.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- OpenApiDriver/openapi_executors.py +2 -469
- OpenApiDriver/openapidriver.libspec +107 -54
- OpenApiLibCore/__init__.py +54 -48
- OpenApiLibCore/dto_base.py +3 -3
- OpenApiLibCore/openapi_libcore.libspec +340 -68
- OpenApiLibCore/openapi_libcore.py +472 -2
- {robotframework_openapitools-0.2.1.dist-info → robotframework_openapitools-0.2.3.dist-info}/METADATA +1 -1
- {robotframework_openapitools-0.2.1.dist-info → robotframework_openapitools-0.2.3.dist-info}/RECORD +10 -10
- {robotframework_openapitools-0.2.1.dist-info → robotframework_openapitools-0.2.3.dist-info}/LICENSE +0 -0
- {robotframework_openapitools-0.2.1.dist-info → robotframework_openapitools-0.2.3.dist-info}/WHEEL +0 -0
@@ -1,100 +1,142 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<keywordspec name="OpenApiLibCore" type="LIBRARY" format="HTML" scope="SUITE" generated="2024-
|
3
|
-
<version>0.2.
|
2
|
+
<keywordspec name="OpenApiLibCore" type="LIBRARY" format="HTML" scope="SUITE" generated="2024-06-20T15:30:30+00:00" specversion="6" source="/workspaces/robotframework-openapitools/src/OpenApiLibCore/openapi_libcore.py" lineno="430">
|
3
|
+
<version>0.2.3</version>
|
4
4
|
<doc><p>Main class providing the keywords and core logic to interact with an OpenAPI server.</p>
|
5
5
|
<p>Visit the <a href="https://github.com/MarketSquare/robotframework-openapi-libcore">library page</a> for an introduction.</p></doc>
|
6
6
|
<tags>
|
7
7
|
</tags>
|
8
8
|
<inits>
|
9
|
-
<init name="__init__" lineno="
|
9
|
+
<init name="__init__" lineno="438">
|
10
10
|
<arguments repr="source: str, origin: str = , base_path: str = , mappings_path: str | Path = , invalid_property_default_response: int = 422, default_id_property_name: str = id, faker_locale: str | List[str] | None = None, recursion_limit: int = 1, recursion_default: Any = {}, username: str = , password: str = , security_token: str = , auth: AuthBase | None = None, cert: str | Tuple[str, str] | None = None, verify_tls: bool | str | None = True, extra_headers: Dict[str, str] | None = None, cookies: Dict[str, str] | RequestsCookieJar | None = None, proxies: Dict[str, str] | None = None">
|
11
11
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="source: str">
|
12
12
|
<name>source</name>
|
13
|
-
<type name="str" typedoc="string"
|
13
|
+
<type name="str" typedoc="string"/>
|
14
14
|
</arg>
|
15
15
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="origin: str = ">
|
16
16
|
<name>origin</name>
|
17
|
-
<type name="str" typedoc="string"
|
17
|
+
<type name="str" typedoc="string"/>
|
18
18
|
<default/>
|
19
19
|
</arg>
|
20
20
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="base_path: str = ">
|
21
21
|
<name>base_path</name>
|
22
|
-
<type name="str" typedoc="string"
|
22
|
+
<type name="str" typedoc="string"/>
|
23
23
|
<default/>
|
24
24
|
</arg>
|
25
25
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="mappings_path: str | Path = ">
|
26
26
|
<name>mappings_path</name>
|
27
|
-
<type name="Union" union="true">
|
27
|
+
<type name="Union" union="true">
|
28
|
+
<type name="str" typedoc="string"/>
|
29
|
+
<type name="Path" typedoc="Path"/>
|
30
|
+
</type>
|
28
31
|
<default/>
|
29
32
|
</arg>
|
30
33
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="invalid_property_default_response: int = 422">
|
31
34
|
<name>invalid_property_default_response</name>
|
32
|
-
<type name="int" typedoc="integer"
|
35
|
+
<type name="int" typedoc="integer"/>
|
33
36
|
<default>422</default>
|
34
37
|
</arg>
|
35
38
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="default_id_property_name: str = id">
|
36
39
|
<name>default_id_property_name</name>
|
37
|
-
<type name="str" typedoc="string"
|
40
|
+
<type name="str" typedoc="string"/>
|
38
41
|
<default>id</default>
|
39
42
|
</arg>
|
40
43
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="faker_locale: str | List[str] | None = None">
|
41
44
|
<name>faker_locale</name>
|
42
|
-
<type name="Union" union="true">
|
45
|
+
<type name="Union" union="true">
|
46
|
+
<type name="str" typedoc="string"/>
|
47
|
+
<type name="List" typedoc="list">
|
48
|
+
<type name="str" typedoc="string"/>
|
49
|
+
</type>
|
50
|
+
<type name="None" typedoc="None"/>
|
51
|
+
</type>
|
43
52
|
<default>None</default>
|
44
53
|
</arg>
|
45
54
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="recursion_limit: int = 1">
|
46
55
|
<name>recursion_limit</name>
|
47
|
-
<type name="int" typedoc="integer"
|
56
|
+
<type name="int" typedoc="integer"/>
|
48
57
|
<default>1</default>
|
49
58
|
</arg>
|
50
59
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="recursion_default: Any = {}">
|
51
60
|
<name>recursion_default</name>
|
52
|
-
<type name="Any" typedoc="Any"
|
61
|
+
<type name="Any" typedoc="Any"/>
|
53
62
|
<default>{}</default>
|
54
63
|
</arg>
|
55
64
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="username: str = ">
|
56
65
|
<name>username</name>
|
57
|
-
<type name="str" typedoc="string"
|
66
|
+
<type name="str" typedoc="string"/>
|
58
67
|
<default/>
|
59
68
|
</arg>
|
60
69
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="password: str = ">
|
61
70
|
<name>password</name>
|
62
|
-
<type name="str" typedoc="string"
|
71
|
+
<type name="str" typedoc="string"/>
|
63
72
|
<default/>
|
64
73
|
</arg>
|
65
74
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="security_token: str = ">
|
66
75
|
<name>security_token</name>
|
67
|
-
<type name="str" typedoc="string"
|
76
|
+
<type name="str" typedoc="string"/>
|
68
77
|
<default/>
|
69
78
|
</arg>
|
70
79
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="auth: AuthBase | None = None">
|
71
80
|
<name>auth</name>
|
72
|
-
<type name="Union" union="true">
|
81
|
+
<type name="Union" union="true">
|
82
|
+
<type name="AuthBase"/>
|
83
|
+
<type name="None" typedoc="None"/>
|
84
|
+
</type>
|
73
85
|
<default>None</default>
|
74
86
|
</arg>
|
75
87
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="cert: str | Tuple[str, str] | None = None">
|
76
88
|
<name>cert</name>
|
77
|
-
<type name="Union" union="true">
|
89
|
+
<type name="Union" union="true">
|
90
|
+
<type name="str" typedoc="string"/>
|
91
|
+
<type name="Tuple" typedoc="tuple">
|
92
|
+
<type name="str" typedoc="string"/>
|
93
|
+
<type name="str" typedoc="string"/>
|
94
|
+
</type>
|
95
|
+
<type name="None" typedoc="None"/>
|
96
|
+
</type>
|
78
97
|
<default>None</default>
|
79
98
|
</arg>
|
80
99
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="verify_tls: bool | str | None = True">
|
81
100
|
<name>verify_tls</name>
|
82
|
-
<type name="Union" union="true">
|
101
|
+
<type name="Union" union="true">
|
102
|
+
<type name="bool" typedoc="boolean"/>
|
103
|
+
<type name="str" typedoc="string"/>
|
104
|
+
<type name="None" typedoc="None"/>
|
105
|
+
</type>
|
83
106
|
<default>True</default>
|
84
107
|
</arg>
|
85
108
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="extra_headers: Dict[str, str] | None = None">
|
86
109
|
<name>extra_headers</name>
|
87
|
-
<type name="Union" union="true">
|
110
|
+
<type name="Union" union="true">
|
111
|
+
<type name="Dict" typedoc="dictionary">
|
112
|
+
<type name="str" typedoc="string"/>
|
113
|
+
<type name="str" typedoc="string"/>
|
114
|
+
</type>
|
115
|
+
<type name="None" typedoc="None"/>
|
116
|
+
</type>
|
88
117
|
<default>None</default>
|
89
118
|
</arg>
|
90
119
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="cookies: Dict[str, str] | RequestsCookieJar | None = None">
|
91
120
|
<name>cookies</name>
|
92
|
-
<type name="Union" union="true">
|
121
|
+
<type name="Union" union="true">
|
122
|
+
<type name="Dict" typedoc="dictionary">
|
123
|
+
<type name="str" typedoc="string"/>
|
124
|
+
<type name="str" typedoc="string"/>
|
125
|
+
</type>
|
126
|
+
<type name="RequestsCookieJar" typedoc="dictionary"/>
|
127
|
+
<type name="None" typedoc="None"/>
|
128
|
+
</type>
|
93
129
|
<default>None</default>
|
94
130
|
</arg>
|
95
131
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="proxies: Dict[str, str] | None = None">
|
96
132
|
<name>proxies</name>
|
97
|
-
<type name="Union" union="true">
|
133
|
+
<type name="Union" union="true">
|
134
|
+
<type name="Dict" typedoc="dictionary">
|
135
|
+
<type name="str" typedoc="string"/>
|
136
|
+
<type name="str" typedoc="string"/>
|
137
|
+
</type>
|
138
|
+
<type name="None" typedoc="None"/>
|
139
|
+
</type>
|
98
140
|
<default>None</default>
|
99
141
|
</arg>
|
100
142
|
</arguments>
|
@@ -144,209 +186,338 @@
|
|
144
186
|
</init>
|
145
187
|
</inits>
|
146
188
|
<keywords>
|
147
|
-
<kw name="Authorized Request" lineno="
|
148
|
-
<arguments repr="url: str, method: str, params: Dict[str, Any] | None = None, headers: Dict[str, str] | None = None, json_data: Dict[str, Dict[str,
|
189
|
+
<kw name="Authorized Request" lineno="1607">
|
190
|
+
<arguments repr="url: str, method: str, params: Dict[str, Any] | None = None, headers: Dict[str, str] | None = None, json_data: Dict[str, Dict[str, JSON] | List[JSON] | str | int | float | bool | None] | List[Dict[str, JSON] | List[JSON] | str | int | float | bool | None] | str | int | float | bool | None = None">
|
149
191
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
150
192
|
<name>url</name>
|
151
|
-
<type name="str" typedoc="string"
|
193
|
+
<type name="str" typedoc="string"/>
|
152
194
|
</arg>
|
153
195
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="method: str">
|
154
196
|
<name>method</name>
|
155
|
-
<type name="str" typedoc="string"
|
197
|
+
<type name="str" typedoc="string"/>
|
156
198
|
</arg>
|
157
199
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="params: Dict[str, Any] | None = None">
|
158
200
|
<name>params</name>
|
159
|
-
<type name="Union" union="true">
|
201
|
+
<type name="Union" union="true">
|
202
|
+
<type name="Dict" typedoc="dictionary">
|
203
|
+
<type name="str" typedoc="string"/>
|
204
|
+
<type name="Any" typedoc="Any"/>
|
205
|
+
</type>
|
206
|
+
<type name="None" typedoc="None"/>
|
207
|
+
</type>
|
160
208
|
<default>None</default>
|
161
209
|
</arg>
|
162
210
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="headers: Dict[str, str] | None = None">
|
163
211
|
<name>headers</name>
|
164
|
-
<type name="Union" union="true">
|
212
|
+
<type name="Union" union="true">
|
213
|
+
<type name="Dict" typedoc="dictionary">
|
214
|
+
<type name="str" typedoc="string"/>
|
215
|
+
<type name="str" typedoc="string"/>
|
216
|
+
</type>
|
217
|
+
<type name="None" typedoc="None"/>
|
218
|
+
</type>
|
165
219
|
<default>None</default>
|
166
220
|
</arg>
|
167
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="json_data: Dict[str, Dict[str,
|
221
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="json_data: Dict[str, Dict[str, JSON] | List[JSON] | str | int | float | bool | None] | List[Dict[str, JSON] | List[JSON] | str | int | float | bool | None] | str | int | float | bool | None = None">
|
168
222
|
<name>json_data</name>
|
169
|
-
<type name="Union" union="true">
|
223
|
+
<type name="Union" union="true">
|
224
|
+
<type name="Dict" typedoc="dictionary">
|
225
|
+
<type name="str" typedoc="string"/>
|
226
|
+
<type name="Union" union="true">
|
227
|
+
<type name="Dict" typedoc="dictionary">
|
228
|
+
<type name="str" typedoc="string"/>
|
229
|
+
<type name="JSON"/>
|
230
|
+
</type>
|
231
|
+
<type name="List" typedoc="list">
|
232
|
+
<type name="JSON"/>
|
233
|
+
</type>
|
234
|
+
<type name="str" typedoc="string"/>
|
235
|
+
<type name="int" typedoc="integer"/>
|
236
|
+
<type name="float" typedoc="float"/>
|
237
|
+
<type name="bool" typedoc="boolean"/>
|
238
|
+
<type name="None" typedoc="None"/>
|
239
|
+
</type>
|
240
|
+
</type>
|
241
|
+
<type name="List" typedoc="list">
|
242
|
+
<type name="Union" union="true">
|
243
|
+
<type name="Dict" typedoc="dictionary">
|
244
|
+
<type name="str" typedoc="string"/>
|
245
|
+
<type name="JSON"/>
|
246
|
+
</type>
|
247
|
+
<type name="List" typedoc="list">
|
248
|
+
<type name="JSON"/>
|
249
|
+
</type>
|
250
|
+
<type name="str" typedoc="string"/>
|
251
|
+
<type name="int" typedoc="integer"/>
|
252
|
+
<type name="float" typedoc="float"/>
|
253
|
+
<type name="bool" typedoc="boolean"/>
|
254
|
+
<type name="None" typedoc="None"/>
|
255
|
+
</type>
|
256
|
+
</type>
|
257
|
+
<type name="str" typedoc="string"/>
|
258
|
+
<type name="int" typedoc="integer"/>
|
259
|
+
<type name="float" typedoc="float"/>
|
260
|
+
<type name="bool" typedoc="boolean"/>
|
261
|
+
<type name="None" typedoc="None"/>
|
262
|
+
</type>
|
170
263
|
<default>None</default>
|
171
264
|
</arg>
|
172
265
|
</arguments>
|
266
|
+
<returntype name="Response"/>
|
173
267
|
<doc><p>Perform a request using the security token or authentication set in the library.</p>
|
174
268
|
<p>&gt; Note: provided username / password or auth objects take precedence over token based security</p></doc>
|
175
269
|
<shortdoc>Perform a request using the security token or authentication set in the library.</shortdoc>
|
176
270
|
</kw>
|
177
|
-
<kw name="Ensure In Use" lineno="
|
271
|
+
<kw name="Ensure In Use" lineno="1511">
|
178
272
|
<arguments repr="url: str, resource_relation: IdReference">
|
179
273
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
180
274
|
<name>url</name>
|
181
|
-
<type name="str" typedoc="string"
|
275
|
+
<type name="str" typedoc="string"/>
|
182
276
|
</arg>
|
183
277
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="resource_relation: IdReference">
|
184
278
|
<name>resource_relation</name>
|
185
|
-
<type name="IdReference"
|
279
|
+
<type name="IdReference"/>
|
186
280
|
</arg>
|
187
281
|
</arguments>
|
188
282
|
<doc><p>Ensure that the (right-most) <span class="name">id</span> of the resource referenced by the <span class="name">url</span> is used by the resource defined by the <span class="name">resource_relation</span>.</p></doc>
|
189
283
|
<shortdoc>Ensure that the (right-most) `id` of the resource referenced by the `url` is used by the resource defined by the `resource_relation`.</shortdoc>
|
190
284
|
</kw>
|
191
|
-
<kw name="Get Ids From Url" lineno="
|
285
|
+
<kw name="Get Ids From Url" lineno="882">
|
192
286
|
<arguments repr="url: str">
|
193
287
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
194
288
|
<name>url</name>
|
195
|
-
<type name="str" typedoc="string"
|
289
|
+
<type name="str" typedoc="string"/>
|
196
290
|
</arg>
|
197
291
|
</arguments>
|
292
|
+
<returntype name="List" typedoc="list">
|
293
|
+
<type name="str" typedoc="string"/>
|
294
|
+
</returntype>
|
198
295
|
<doc><p>Perform a GET request on the <span class="name">url</span> and return the list of resource <span class="name">ids</span> from the response.</p></doc>
|
199
296
|
<shortdoc>Perform a GET request on the `url` and return the list of resource `ids` from the response.</shortdoc>
|
200
297
|
</kw>
|
201
|
-
<kw name="Get Invalid Json Data" lineno="
|
298
|
+
<kw name="Get Invalid Json Data" lineno="1288">
|
202
299
|
<arguments repr="url: str, method: str, status_code: int, request_data: RequestData">
|
203
300
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
204
301
|
<name>url</name>
|
205
|
-
<type name="str" typedoc="string"
|
302
|
+
<type name="str" typedoc="string"/>
|
206
303
|
</arg>
|
207
304
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="method: str">
|
208
305
|
<name>method</name>
|
209
|
-
<type name="str" typedoc="string"
|
306
|
+
<type name="str" typedoc="string"/>
|
210
307
|
</arg>
|
211
308
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="status_code: int">
|
212
309
|
<name>status_code</name>
|
213
|
-
<type name="int" typedoc="integer"
|
310
|
+
<type name="int" typedoc="integer"/>
|
214
311
|
</arg>
|
215
312
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="request_data: RequestData">
|
216
313
|
<name>request_data</name>
|
217
|
-
<type name="RequestData"
|
314
|
+
<type name="RequestData"/>
|
218
315
|
</arg>
|
219
316
|
</arguments>
|
317
|
+
<returntype name="Dict" typedoc="dictionary">
|
318
|
+
<type name="str" typedoc="string"/>
|
319
|
+
<type name="Any" typedoc="Any"/>
|
320
|
+
</returntype>
|
220
321
|
<doc><p>Return <span class="name">json_data</span> based on the <span class="name">dto</span> on the <span class="name">request_data</span> that will cause the provided <span class="name">status_code</span> for the <span class="name">method</span> operation on the <span class="name">url</span>.</p>
|
221
322
|
<p>&gt; Note: applicable UniquePropertyValueConstraint and IdReference Relations are considered before changes to <span class="name">json_data</span> are made.</p></doc>
|
222
323
|
<shortdoc>Return `json_data` based on the `dto` on the `request_data` that will cause the provided `status_code` for the `method` operation on the `url`.</shortdoc>
|
223
324
|
</kw>
|
224
|
-
<kw name="Get Invalidated Parameters" lineno="
|
325
|
+
<kw name="Get Invalidated Parameters" lineno="1336">
|
225
326
|
<arguments repr="status_code: int, request_data: RequestData">
|
226
327
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="status_code: int">
|
227
328
|
<name>status_code</name>
|
228
|
-
<type name="int" typedoc="integer"
|
329
|
+
<type name="int" typedoc="integer"/>
|
229
330
|
</arg>
|
230
331
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="request_data: RequestData">
|
231
332
|
<name>request_data</name>
|
232
|
-
<type name="RequestData"
|
333
|
+
<type name="RequestData"/>
|
233
334
|
</arg>
|
234
335
|
</arguments>
|
336
|
+
<returntype name="Tuple" typedoc="tuple">
|
337
|
+
<type name="Dict" typedoc="dictionary">
|
338
|
+
<type name="str" typedoc="string"/>
|
339
|
+
<type name="Any" typedoc="Any"/>
|
340
|
+
</type>
|
341
|
+
<type name="Dict" typedoc="dictionary">
|
342
|
+
<type name="str" typedoc="string"/>
|
343
|
+
<type name="str" typedoc="string"/>
|
344
|
+
</type>
|
345
|
+
</returntype>
|
235
346
|
<doc><p>Returns a version of <span class="name">params, headers</span> as present on <span class="name">request_data</span> that has been modified to cause the provided <span class="name">status_code</span>.</p></doc>
|
236
347
|
<shortdoc>Returns a version of `params, headers` as present on `request_data` that has been modified to cause the provided `status_code`.</shortdoc>
|
237
348
|
</kw>
|
238
|
-
<kw name="Get Invalidated Url" lineno="
|
349
|
+
<kw name="Get Invalidated Url" lineno="1254">
|
239
350
|
<arguments repr="valid_url: str">
|
240
351
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="valid_url: str">
|
241
352
|
<name>valid_url</name>
|
242
|
-
<type name="str" typedoc="string"
|
353
|
+
<type name="str" typedoc="string"/>
|
243
354
|
</arg>
|
244
355
|
</arguments>
|
356
|
+
<returntype name="Union" union="true">
|
357
|
+
<type name="str" typedoc="string"/>
|
358
|
+
<type name="None" typedoc="None"/>
|
359
|
+
</returntype>
|
245
360
|
<doc><p>Return an url with all the path parameters in the <span class="name">valid_url</span> replaced by a random UUID.</p>
|
246
361
|
<p>Raises ValueError if the valid_url cannot be invalidated.</p></doc>
|
247
362
|
<shortdoc>Return an url with all the path parameters in the `valid_url` replaced by a random UUID.</shortdoc>
|
248
363
|
</kw>
|
249
|
-
<kw name="Get Json Data For Dto Class" lineno="
|
364
|
+
<kw name="Get Json Data For Dto Class" lineno="1130">
|
250
365
|
<arguments repr="schema: Dict[str, Any], dto_class: Dto | Type[Dto], operation_id: str = ">
|
251
366
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="schema: Dict[str, Any]">
|
252
367
|
<name>schema</name>
|
253
|
-
<type name="Dict" typedoc="dictionary">
|
368
|
+
<type name="Dict" typedoc="dictionary">
|
369
|
+
<type name="str" typedoc="string"/>
|
370
|
+
<type name="Any" typedoc="Any"/>
|
371
|
+
</type>
|
254
372
|
</arg>
|
255
373
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="dto_class: Dto | Type[Dto]">
|
256
374
|
<name>dto_class</name>
|
257
|
-
<type name="Union" union="true">
|
375
|
+
<type name="Union" union="true">
|
376
|
+
<type name="Dto"/>
|
377
|
+
<type name="Type">
|
378
|
+
<type name="Dto"/>
|
379
|
+
</type>
|
380
|
+
</type>
|
258
381
|
</arg>
|
259
382
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="operation_id: str = ">
|
260
383
|
<name>operation_id</name>
|
261
|
-
<type name="str" typedoc="string"
|
384
|
+
<type name="str" typedoc="string"/>
|
262
385
|
<default/>
|
263
386
|
</arg>
|
264
387
|
</arguments>
|
388
|
+
<returntype name="Union" union="true">
|
389
|
+
<type name="Dict" typedoc="dictionary">
|
390
|
+
<type name="str" typedoc="string"/>
|
391
|
+
<type name="Any" typedoc="Any"/>
|
392
|
+
</type>
|
393
|
+
<type name="None" typedoc="None"/>
|
394
|
+
</returntype>
|
265
395
|
<doc><p>Generate a valid (json-compatible) dict for all the <span class="name">dto_class</span> properties.</p></doc>
|
266
396
|
<shortdoc>Generate a valid (json-compatible) dict for all the `dto_class` properties.</shortdoc>
|
267
397
|
</kw>
|
268
|
-
<kw name="Get Json Data With Conflict" lineno="
|
398
|
+
<kw name="Get Json Data With Conflict" lineno="1555">
|
269
399
|
<arguments repr="url: str, method: str, dto: Dto, conflict_status_code: int">
|
270
400
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
271
401
|
<name>url</name>
|
272
|
-
<type name="str" typedoc="string"
|
402
|
+
<type name="str" typedoc="string"/>
|
273
403
|
</arg>
|
274
404
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="method: str">
|
275
405
|
<name>method</name>
|
276
|
-
<type name="str" typedoc="string"
|
406
|
+
<type name="str" typedoc="string"/>
|
277
407
|
</arg>
|
278
408
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="dto: Dto">
|
279
409
|
<name>dto</name>
|
280
|
-
<type name="Dto"
|
410
|
+
<type name="Dto"/>
|
281
411
|
</arg>
|
282
412
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="conflict_status_code: int">
|
283
413
|
<name>conflict_status_code</name>
|
284
|
-
<type name="int" typedoc="integer"
|
414
|
+
<type name="int" typedoc="integer"/>
|
285
415
|
</arg>
|
286
416
|
</arguments>
|
417
|
+
<returntype name="Dict" typedoc="dictionary">
|
418
|
+
<type name="str" typedoc="string"/>
|
419
|
+
<type name="Any" typedoc="Any"/>
|
420
|
+
</returntype>
|
287
421
|
<doc><p>Return <span class="name">json_data</span> based on the <span class="name">UniquePropertyValueConstraint</span> that must be returned by the <span class="name">get_relations</span> implementation on the <span class="name">dto</span> for the given <span class="name">conflict_status_code</span>.</p></doc>
|
288
422
|
<shortdoc>Return `json_data` based on the `UniquePropertyValueConstraint` that must be returned by the `get_relations` implementation on the `dto` for the given `conflict_status_code`.</shortdoc>
|
289
423
|
</kw>
|
290
|
-
<kw name="Get Parameterized Endpoint From Url" lineno="
|
424
|
+
<kw name="Get Parameterized Endpoint From Url" lineno="1276">
|
291
425
|
<arguments repr="url: str">
|
292
426
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
293
427
|
<name>url</name>
|
294
|
-
<type name="str" typedoc="string"
|
428
|
+
<type name="str" typedoc="string"/>
|
295
429
|
</arg>
|
296
430
|
</arguments>
|
431
|
+
<returntype name="str" typedoc="string"/>
|
297
432
|
<doc><p>Return the endpoint as found in the <span class="name">paths</span> section based on the given <span class="name">url</span>.</p></doc>
|
298
433
|
<shortdoc>Return the endpoint as found in the `paths` section based on the given `url`.</shortdoc>
|
299
434
|
</kw>
|
300
|
-
<kw name="Get Request Data" lineno="
|
435
|
+
<kw name="Get Request Data" lineno="922">
|
301
436
|
<arguments repr="endpoint: str, method: str">
|
302
437
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="endpoint: str">
|
303
438
|
<name>endpoint</name>
|
304
|
-
<type name="str" typedoc="string"
|
439
|
+
<type name="str" typedoc="string"/>
|
305
440
|
</arg>
|
306
441
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="method: str">
|
307
442
|
<name>method</name>
|
308
|
-
<type name="str" typedoc="string"
|
443
|
+
<type name="str" typedoc="string"/>
|
309
444
|
</arg>
|
310
445
|
</arguments>
|
446
|
+
<returntype name="RequestData"/>
|
311
447
|
<doc><p>Return an object with valid request data for body, headers and query params.</p></doc>
|
312
448
|
<shortdoc>Return an object with valid request data for body, headers and query params.</shortdoc>
|
313
449
|
</kw>
|
314
|
-
<kw name="Get Valid Id For Endpoint" lineno="
|
450
|
+
<kw name="Get Valid Id For Endpoint" lineno="786">
|
315
451
|
<arguments repr="endpoint: str, method: str">
|
316
452
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="endpoint: str">
|
317
453
|
<name>endpoint</name>
|
318
|
-
<type name="str" typedoc="string"
|
454
|
+
<type name="str" typedoc="string"/>
|
319
455
|
</arg>
|
320
456
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="method: str">
|
321
457
|
<name>method</name>
|
322
|
-
<type name="str" typedoc="string"
|
458
|
+
<type name="str" typedoc="string"/>
|
323
459
|
</arg>
|
324
460
|
</arguments>
|
461
|
+
<returntype name="Union" union="true">
|
462
|
+
<type name="str" typedoc="string"/>
|
463
|
+
<type name="int" typedoc="integer"/>
|
464
|
+
<type name="float" typedoc="float"/>
|
465
|
+
</returntype>
|
325
466
|
<doc><p>Support keyword that returns the <span class="name">id</span> for an existing resource at <span class="name">endpoint</span>.</p>
|
326
467
|
<p>To prevent resource conflicts with other test cases, a new resource is created (POST) if possible.</p></doc>
|
327
468
|
<shortdoc>Support keyword that returns the `id` for an existing resource at `endpoint`.</shortdoc>
|
328
469
|
</kw>
|
329
|
-
<kw name="Get Valid Url" lineno="
|
470
|
+
<kw name="Get Valid Url" lineno="746">
|
330
471
|
<arguments repr="endpoint: str, method: str">
|
331
472
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="endpoint: str">
|
332
473
|
<name>endpoint</name>
|
333
|
-
<type name="str" typedoc="string"
|
474
|
+
<type name="str" typedoc="string"/>
|
334
475
|
</arg>
|
335
476
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="method: str">
|
336
477
|
<name>method</name>
|
337
|
-
<type name="str" typedoc="string"
|
478
|
+
<type name="str" typedoc="string"/>
|
338
479
|
</arg>
|
339
480
|
</arguments>
|
481
|
+
<returntype name="str" typedoc="string"/>
|
340
482
|
<doc><p>This keyword returns a valid url for the given <span class="name">endpoint</span> and <span class="name">method</span>.</p>
|
341
483
|
<p>If the <span class="name">endpoint</span> contains path parameters the Get Valid Id For Endpoint keyword will be executed to retrieve valid ids for the path parameters.</p>
|
342
484
|
<p>&gt; Note: if valid ids cannot be retrieved within the scope of the API, the <span class="name">PathPropertiesConstraint</span> Relation can be used. More information can be found <a href="https://marketsquare.github.io/robotframework-openapi-libcore/advanced_use.html">here</a>.</p></doc>
|
343
485
|
<shortdoc>This keyword returns a valid url for the given `endpoint` and `method`.</shortdoc>
|
344
486
|
</kw>
|
345
|
-
<kw name="
|
487
|
+
<kw name="Perform Validated Request" lineno="1645">
|
488
|
+
<arguments repr="path: str, status_code: int, request_values: RequestValues, original_data: Dict[str, Any] | None = None">
|
489
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
490
|
+
<name>path</name>
|
491
|
+
<type name="str" typedoc="string"/>
|
492
|
+
</arg>
|
493
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="status_code: int">
|
494
|
+
<name>status_code</name>
|
495
|
+
<type name="int" typedoc="integer"/>
|
496
|
+
</arg>
|
497
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="request_values: RequestValues">
|
498
|
+
<name>request_values</name>
|
499
|
+
<type name="RequestValues"/>
|
500
|
+
</arg>
|
501
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data: Dict[str, Any] | None = None">
|
502
|
+
<name>original_data</name>
|
503
|
+
<type name="Union" union="true">
|
504
|
+
<type name="Dict" typedoc="dictionary">
|
505
|
+
<type name="str" typedoc="string"/>
|
506
|
+
<type name="Any" typedoc="Any"/>
|
507
|
+
</type>
|
508
|
+
<type name="None" typedoc="None"/>
|
509
|
+
</type>
|
510
|
+
<default>None</default>
|
511
|
+
</arg>
|
512
|
+
</arguments>
|
513
|
+
<doc><p>This keyword first calls the Authorized Request keyword, then the Validate Response keyword and finally validates, for <span class="name">DELETE</span> operations, whether the target resource was indeed deleted (OK response) or not (error responses).</p></doc>
|
514
|
+
<shortdoc>This keyword first calls the Authorized Request keyword, then the Validate Response keyword and finally validates, for `DELETE` operations, whether the target resource was indeed deleted (OK response) or not (error responses).</shortdoc>
|
515
|
+
</kw>
|
516
|
+
<kw name="Set Origin" lineno="607">
|
346
517
|
<arguments repr="origin: str">
|
347
518
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="origin: str">
|
348
519
|
<name>origin</name>
|
349
|
-
<type name="str" typedoc="string"
|
520
|
+
<type name="str" typedoc="string"/>
|
350
521
|
</arg>
|
351
522
|
</arguments>
|
352
523
|
<doc><p>Update the <span class="name">origin</span> after the library is imported.</p>
|
@@ -354,9 +525,81 @@
|
|
354
525
|
<p>In combination with OpenApiLibCore, the <span class="name">origin</span> can be used at any point to target another server that hosts an API that complies to the same OAS.</p></doc>
|
355
526
|
<shortdoc>Update the `origin` after the library is imported.</shortdoc>
|
356
527
|
</kw>
|
528
|
+
<kw name="Validate Resource Properties" lineno="1871">
|
529
|
+
<arguments repr="resource: Dict[str, Any], schema: Dict[str, Any]">
|
530
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="resource: Dict[str, Any]">
|
531
|
+
<name>resource</name>
|
532
|
+
<type name="Dict" typedoc="dictionary">
|
533
|
+
<type name="str" typedoc="string"/>
|
534
|
+
<type name="Any" typedoc="Any"/>
|
535
|
+
</type>
|
536
|
+
</arg>
|
537
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="schema: Dict[str, Any]">
|
538
|
+
<name>schema</name>
|
539
|
+
<type name="Dict" typedoc="dictionary">
|
540
|
+
<type name="str" typedoc="string"/>
|
541
|
+
<type name="Any" typedoc="Any"/>
|
542
|
+
</type>
|
543
|
+
</arg>
|
544
|
+
</arguments>
|
545
|
+
<doc><p>Validate that the <span class="name">resource</span> does not contain any properties that are not defined in the <span class="name">schema_properties</span>.</p></doc>
|
546
|
+
<shortdoc>Validate that the `resource` does not contain any properties that are not defined in the `schema_properties`.</shortdoc>
|
547
|
+
</kw>
|
548
|
+
<kw name="Validate Response" lineno="1719">
|
549
|
+
<arguments repr="path: str, response: Response, original_data: Dict[str, Any] | None = None">
|
550
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
551
|
+
<name>path</name>
|
552
|
+
<type name="str" typedoc="string"/>
|
553
|
+
</arg>
|
554
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="response: Response">
|
555
|
+
<name>response</name>
|
556
|
+
<type name="Response"/>
|
557
|
+
</arg>
|
558
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data: Dict[str, Any] | None = None">
|
559
|
+
<name>original_data</name>
|
560
|
+
<type name="Union" union="true">
|
561
|
+
<type name="Dict" typedoc="dictionary">
|
562
|
+
<type name="str" typedoc="string"/>
|
563
|
+
<type name="Any" typedoc="Any"/>
|
564
|
+
</type>
|
565
|
+
<type name="None" typedoc="None"/>
|
566
|
+
</type>
|
567
|
+
<default>None</default>
|
568
|
+
</arg>
|
569
|
+
</arguments>
|
570
|
+
<doc><p>Validate the <span class="name">response</span> by performing the following validations:</p>
|
571
|
+
<ul>
|
572
|
+
<li>validate the <span class="name">response</span> against the openapi schema for the <span class="name">endpoint</span></li>
|
573
|
+
<li>validate that the response does not contain extra properties</li>
|
574
|
+
<li>validate that a href, if present, refers to the correct resource</li>
|
575
|
+
<li>validate that the value for a property that is in the response is equal to the property value that was send</li>
|
576
|
+
<li>validate that no <span class="name">original_data</span> is preserved when performing a PUT operation</li>
|
577
|
+
<li>validate that a PATCH operation only updates the provided properties</li>
|
578
|
+
</ul></doc>
|
579
|
+
<shortdoc>Validate the `response` by performing the following validations: - validate the `response` against the openapi schema for the `endpoint` - validate that the response does not contain extra properties - validate that a href, if present, refers to the correct resource - validate that the value for a property that is in the response is equal to the property value that was send - validate that no `original_data` is preserved when performing a PUT operation - validate that a PATCH operation only updates the provided properties</shortdoc>
|
580
|
+
</kw>
|
581
|
+
<kw name="Validate Send Response" lineno="1989">
|
582
|
+
<arguments repr="response: Response, original_data: Dict[str, Any] | None = None">
|
583
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="response: Response">
|
584
|
+
<name>response</name>
|
585
|
+
<type name="Response"/>
|
586
|
+
</arg>
|
587
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data: Dict[str, Any] | None = None">
|
588
|
+
<name>original_data</name>
|
589
|
+
<type name="Union" union="true">
|
590
|
+
<type name="Dict" typedoc="dictionary">
|
591
|
+
<type name="str" typedoc="string"/>
|
592
|
+
<type name="Any" typedoc="Any"/>
|
593
|
+
</type>
|
594
|
+
<type name="None" typedoc="None"/>
|
595
|
+
</type>
|
596
|
+
<default>None</default>
|
597
|
+
</arg>
|
598
|
+
</arguments>
|
599
|
+
<doc><p>Validate that each property that was send that is in the response has the value that was send. In case a PATCH request, validate that only the properties that were patched have changed and that other properties are still at their pre-patch values.</p></doc>
|
600
|
+
<shortdoc>Validate that each property that was send that is in the response has the value that was send. In case a PATCH request, validate that only the properties that were patched have changed and that other properties are still at their pre-patch values.</shortdoc>
|
601
|
+
</kw>
|
357
602
|
</keywords>
|
358
|
-
<datatypes>
|
359
|
-
</datatypes>
|
360
603
|
<typedocs>
|
361
604
|
<type name="Any" type="Standard">
|
362
605
|
<doc><p>Any value is accepted. No conversion is done.</p></doc>
|
@@ -366,7 +609,14 @@
|
|
366
609
|
<usages>
|
367
610
|
<usage>__init__</usage>
|
368
611
|
<usage>Authorized Request</usage>
|
612
|
+
<usage>Get Invalid Json Data</usage>
|
613
|
+
<usage>Get Invalidated Parameters</usage>
|
369
614
|
<usage>Get Json Data For Dto Class</usage>
|
615
|
+
<usage>Get Json Data With Conflict</usage>
|
616
|
+
<usage>Perform Validated Request</usage>
|
617
|
+
<usage>Validate Resource Properties</usage>
|
618
|
+
<usage>Validate Response</usage>
|
619
|
+
<usage>Validate Send Response</usage>
|
370
620
|
</usages>
|
371
621
|
</type>
|
372
622
|
<type name="boolean" type="Standard">
|
@@ -394,7 +644,14 @@
|
|
394
644
|
<usages>
|
395
645
|
<usage>__init__</usage>
|
396
646
|
<usage>Authorized Request</usage>
|
647
|
+
<usage>Get Invalid Json Data</usage>
|
648
|
+
<usage>Get Invalidated Parameters</usage>
|
397
649
|
<usage>Get Json Data For Dto Class</usage>
|
650
|
+
<usage>Get Json Data With Conflict</usage>
|
651
|
+
<usage>Perform Validated Request</usage>
|
652
|
+
<usage>Validate Resource Properties</usage>
|
653
|
+
<usage>Validate Response</usage>
|
654
|
+
<usage>Validate Send Response</usage>
|
398
655
|
</usages>
|
399
656
|
</type>
|
400
657
|
<type name="float" type="Standard">
|
@@ -407,6 +664,7 @@
|
|
407
664
|
</accepts>
|
408
665
|
<usages>
|
409
666
|
<usage>Authorized Request</usage>
|
667
|
+
<usage>Get Valid Id For Endpoint</usage>
|
410
668
|
</usages>
|
411
669
|
</type>
|
412
670
|
<type name="integer" type="Standard">
|
@@ -424,6 +682,8 @@
|
|
424
682
|
<usage>Get Invalid Json Data</usage>
|
425
683
|
<usage>Get Invalidated Parameters</usage>
|
426
684
|
<usage>Get Json Data With Conflict</usage>
|
685
|
+
<usage>Get Valid Id For Endpoint</usage>
|
686
|
+
<usage>Perform Validated Request</usage>
|
427
687
|
</usages>
|
428
688
|
</type>
|
429
689
|
<type name="list" type="Standard">
|
@@ -437,6 +697,7 @@
|
|
437
697
|
<usages>
|
438
698
|
<usage>__init__</usage>
|
439
699
|
<usage>Authorized Request</usage>
|
700
|
+
<usage>Get Ids From Url</usage>
|
440
701
|
</usages>
|
441
702
|
</type>
|
442
703
|
<type name="None" type="Standard">
|
@@ -447,6 +708,11 @@
|
|
447
708
|
<usages>
|
448
709
|
<usage>__init__</usage>
|
449
710
|
<usage>Authorized Request</usage>
|
711
|
+
<usage>Get Invalidated Url</usage>
|
712
|
+
<usage>Get Json Data For Dto Class</usage>
|
713
|
+
<usage>Perform Validated Request</usage>
|
714
|
+
<usage>Validate Response</usage>
|
715
|
+
<usage>Validate Send Response</usage>
|
450
716
|
</usages>
|
451
717
|
</type>
|
452
718
|
<type name="Path" type="Standard">
|
@@ -471,6 +737,7 @@
|
|
471
737
|
<usage>Ensure In Use</usage>
|
472
738
|
<usage>Get Ids From Url</usage>
|
473
739
|
<usage>Get Invalid Json Data</usage>
|
740
|
+
<usage>Get Invalidated Parameters</usage>
|
474
741
|
<usage>Get Invalidated Url</usage>
|
475
742
|
<usage>Get Json Data For Dto Class</usage>
|
476
743
|
<usage>Get Json Data With Conflict</usage>
|
@@ -478,7 +745,11 @@
|
|
478
745
|
<usage>Get Request Data</usage>
|
479
746
|
<usage>Get Valid Id For Endpoint</usage>
|
480
747
|
<usage>Get Valid Url</usage>
|
748
|
+
<usage>Perform Validated Request</usage>
|
481
749
|
<usage>Set Origin</usage>
|
750
|
+
<usage>Validate Resource Properties</usage>
|
751
|
+
<usage>Validate Response</usage>
|
752
|
+
<usage>Validate Send Response</usage>
|
482
753
|
</usages>
|
483
754
|
</type>
|
484
755
|
<type name="tuple" type="Standard">
|
@@ -491,6 +762,7 @@
|
|
491
762
|
</accepts>
|
492
763
|
<usages>
|
493
764
|
<usage>__init__</usage>
|
765
|
+
<usage>Get Invalidated Parameters</usage>
|
494
766
|
</usages>
|
495
767
|
</type>
|
496
768
|
</typedocs>
|