robotframework-openapitools 0.3.0__py3-none-any.whl → 1.0.0b1__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/__init__.py +44 -41
- OpenApiDriver/openapi_executors.py +48 -42
- OpenApiDriver/openapi_reader.py +115 -116
- OpenApiDriver/openapidriver.libspec +72 -62
- OpenApiDriver/openapidriver.py +25 -19
- OpenApiLibCore/__init__.py +13 -11
- OpenApiLibCore/annotations.py +3 -0
- OpenApiLibCore/data_generation/__init__.py +12 -0
- OpenApiLibCore/data_generation/body_data_generation.py +269 -0
- OpenApiLibCore/data_generation/data_generation_core.py +240 -0
- OpenApiLibCore/data_invalidation.py +281 -0
- OpenApiLibCore/dto_base.py +43 -40
- OpenApiLibCore/dto_utils.py +97 -85
- OpenApiLibCore/oas_cache.py +14 -13
- OpenApiLibCore/openapi_libcore.libspec +361 -188
- OpenApiLibCore/openapi_libcore.py +392 -1645
- OpenApiLibCore/parameter_utils.py +89 -0
- OpenApiLibCore/path_functions.py +215 -0
- OpenApiLibCore/path_invalidation.py +44 -0
- OpenApiLibCore/protocols.py +30 -0
- OpenApiLibCore/request_data.py +275 -0
- OpenApiLibCore/resource_relations.py +54 -0
- OpenApiLibCore/validation.py +497 -0
- OpenApiLibCore/value_utils.py +528 -481
- openapi_libgen/__init__.py +46 -0
- openapi_libgen/command_line.py +87 -0
- openapi_libgen/parsing_utils.py +26 -0
- openapi_libgen/spec_parser.py +212 -0
- openapi_libgen/templates/__init__.jinja +3 -0
- openapi_libgen/templates/library.jinja +30 -0
- robotframework_openapitools-1.0.0b1.dist-info/METADATA +237 -0
- robotframework_openapitools-1.0.0b1.dist-info/RECORD +37 -0
- {robotframework_openapitools-0.3.0.dist-info → robotframework_openapitools-1.0.0b1.dist-info}/WHEEL +1 -1
- robotframework_openapitools-1.0.0b1.dist-info/entry_points.txt +3 -0
- roboswag/__init__.py +0 -9
- roboswag/__main__.py +0 -3
- roboswag/auth.py +0 -44
- roboswag/cli.py +0 -80
- roboswag/core.py +0 -85
- roboswag/generate/__init__.py +0 -1
- roboswag/generate/generate.py +0 -121
- roboswag/generate/models/__init__.py +0 -0
- roboswag/generate/models/api.py +0 -219
- roboswag/generate/models/definition.py +0 -28
- roboswag/generate/models/endpoint.py +0 -68
- roboswag/generate/models/parameter.py +0 -25
- roboswag/generate/models/response.py +0 -8
- roboswag/generate/models/tag.py +0 -16
- roboswag/generate/models/utils.py +0 -60
- roboswag/generate/templates/api_init.jinja +0 -15
- roboswag/generate/templates/models.jinja +0 -7
- roboswag/generate/templates/paths.jinja +0 -68
- roboswag/logger.py +0 -33
- roboswag/validate/__init__.py +0 -6
- roboswag/validate/core.py +0 -3
- roboswag/validate/schema.py +0 -21
- roboswag/validate/text_response.py +0 -14
- robotframework_openapitools-0.3.0.dist-info/METADATA +0 -41
- robotframework_openapitools-0.3.0.dist-info/RECORD +0 -41
- {robotframework_openapitools-0.3.0.dist-info → robotframework_openapitools-1.0.0b1.dist-info}/LICENSE +0 -0
@@ -1,13 +1,13 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<keywordspec name="OpenApiLibCore" type="LIBRARY" format="HTML" scope="SUITE" generated="
|
3
|
-
<version>0.
|
2
|
+
<keywordspec name="OpenApiLibCore" type="LIBRARY" format="HTML" scope="SUITE" generated="2025-04-01T12:12:26+00:00" specversion="6" source="/workspaces/robotframework-openapitools/src/OpenApiLibCore/openapi_libcore.py" lineno="174">
|
3
|
+
<version>1.0.0b1</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="
|
10
|
-
<arguments repr="source: str, origin: str = , base_path: str = , response_validation: ValidationLevel = WARN, disable_server_validation: bool = True, mappings_path: str | Path = , invalid_property_default_response: int = 422, default_id_property_name: str = id, faker_locale: str |
|
9
|
+
<init name="__init__" lineno="182">
|
10
|
+
<arguments repr="source: str, origin: str = , base_path: str = , response_validation: ValidationLevel = WARN, disable_server_validation: bool = True, mappings_path: str | Path = , invalid_property_default_response: int = 422, default_id_property_name: str = id, faker_locale: str | list[str] = , require_body_for_invalid_url: bool = False, recursion_limit: int = 1, recursion_default: dict[str, JSON] | list[JSON] | str | bytes | int | float | bool | None = {}, username: str = , password: str = , security_token: str = , auth: AuthBase | None = None, cert: str | tuple[str, str] = , verify_tls: bool | str = True, extra_headers: Mapping[str, str] = {}, cookies: MutableMapping[str, str] | RequestsCookieJar | None = None, proxies: MutableMapping[str, str] | None = None">
|
11
11
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="source: str">
|
12
12
|
<name>source</name>
|
13
13
|
<type name="str" typedoc="string"/>
|
@@ -50,16 +50,15 @@
|
|
50
50
|
<type name="str" typedoc="string"/>
|
51
51
|
<default>id</default>
|
52
52
|
</arg>
|
53
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="faker_locale: str |
|
53
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="faker_locale: str | list[str] = ">
|
54
54
|
<name>faker_locale</name>
|
55
55
|
<type name="Union" union="true">
|
56
56
|
<type name="str" typedoc="string"/>
|
57
|
-
<type name="
|
57
|
+
<type name="list" typedoc="list">
|
58
58
|
<type name="str" typedoc="string"/>
|
59
59
|
</type>
|
60
|
-
<type name="None" typedoc="None"/>
|
61
60
|
</type>
|
62
|
-
<default
|
61
|
+
<default/>
|
63
62
|
</arg>
|
64
63
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="require_body_for_invalid_url: bool = False">
|
65
64
|
<name>require_body_for_invalid_url</name>
|
@@ -71,9 +70,23 @@
|
|
71
70
|
<type name="int" typedoc="integer"/>
|
72
71
|
<default>1</default>
|
73
72
|
</arg>
|
74
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="recursion_default:
|
73
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="recursion_default: dict[str, JSON] | list[JSON] | str | bytes | int | float | bool | None = {}">
|
75
74
|
<name>recursion_default</name>
|
76
|
-
<type name="
|
75
|
+
<type name="Union" union="true">
|
76
|
+
<type name="dict" typedoc="dictionary">
|
77
|
+
<type name="str" typedoc="string"/>
|
78
|
+
<type name="JSON"/>
|
79
|
+
</type>
|
80
|
+
<type name="list" typedoc="list">
|
81
|
+
<type name="JSON"/>
|
82
|
+
</type>
|
83
|
+
<type name="str" typedoc="string"/>
|
84
|
+
<type name="bytes" typedoc="bytes"/>
|
85
|
+
<type name="int" typedoc="integer"/>
|
86
|
+
<type name="float" typedoc="float"/>
|
87
|
+
<type name="bool" typedoc="boolean"/>
|
88
|
+
<type name="None" typedoc="None"/>
|
89
|
+
</type>
|
77
90
|
<default>{}</default>
|
78
91
|
</arg>
|
79
92
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="username: str = ">
|
@@ -99,42 +112,37 @@
|
|
99
112
|
</type>
|
100
113
|
<default>None</default>
|
101
114
|
</arg>
|
102
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="cert: str |
|
115
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="cert: str | tuple[str, str] = ">
|
103
116
|
<name>cert</name>
|
104
117
|
<type name="Union" union="true">
|
105
118
|
<type name="str" typedoc="string"/>
|
106
|
-
<type name="
|
119
|
+
<type name="tuple" typedoc="tuple">
|
107
120
|
<type name="str" typedoc="string"/>
|
108
121
|
<type name="str" typedoc="string"/>
|
109
122
|
</type>
|
110
|
-
<type name="None" typedoc="None"/>
|
111
123
|
</type>
|
112
|
-
<default
|
124
|
+
<default/>
|
113
125
|
</arg>
|
114
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="verify_tls: bool | str
|
126
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="verify_tls: bool | str = True">
|
115
127
|
<name>verify_tls</name>
|
116
128
|
<type name="Union" union="true">
|
117
129
|
<type name="bool" typedoc="boolean"/>
|
118
130
|
<type name="str" typedoc="string"/>
|
119
|
-
<type name="None" typedoc="None"/>
|
120
131
|
</type>
|
121
132
|
<default>True</default>
|
122
133
|
</arg>
|
123
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="extra_headers:
|
134
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="extra_headers: Mapping[str, str] = {}">
|
124
135
|
<name>extra_headers</name>
|
125
|
-
<type name="
|
126
|
-
<type name="Dict" typedoc="dictionary">
|
136
|
+
<type name="Mapping" typedoc="dictionary">
|
127
137
|
<type name="str" typedoc="string"/>
|
128
138
|
<type name="str" typedoc="string"/>
|
129
139
|
</type>
|
130
|
-
<
|
131
|
-
</type>
|
132
|
-
<default>None</default>
|
140
|
+
<default>{}</default>
|
133
141
|
</arg>
|
134
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="cookies:
|
142
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="cookies: MutableMapping[str, str] | RequestsCookieJar | None = None">
|
135
143
|
<name>cookies</name>
|
136
144
|
<type name="Union" union="true">
|
137
|
-
<type name="
|
145
|
+
<type name="MutableMapping" typedoc="dictionary">
|
138
146
|
<type name="str" typedoc="string"/>
|
139
147
|
<type name="str" typedoc="string"/>
|
140
148
|
</type>
|
@@ -143,10 +151,10 @@
|
|
143
151
|
</type>
|
144
152
|
<default>None</default>
|
145
153
|
</arg>
|
146
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="proxies:
|
154
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="proxies: MutableMapping[str, str] | None = None">
|
147
155
|
<name>proxies</name>
|
148
156
|
<type name="Union" union="true">
|
149
|
-
<type name="
|
157
|
+
<type name="MutableMapping" typedoc="dictionary">
|
150
158
|
<type name="str" typedoc="string"/>
|
151
159
|
<type name="str" typedoc="string"/>
|
152
160
|
</type>
|
@@ -161,7 +169,7 @@
|
|
161
169
|
<h4>origin</h4>
|
162
170
|
<p>The server (and port) of the target server. E.g. <code>https://localhost:8000</code></p>
|
163
171
|
<h4>base_path</h4>
|
164
|
-
<p>The routing between <code>origin</code> and the
|
172
|
+
<p>The routing between <code>origin</code> and the paths as found in the <code>paths</code> section in the openapi document. E.g. <code>/petshop/v2</code>.</p>
|
165
173
|
<h3>Test case execution</h3>
|
166
174
|
<h4>response_validation</h4>
|
167
175
|
<p>By default, a <code>WARN</code> is logged when the Response received after a Request does not comply with the schema as defined in the openapi document for the given operation. The following values are supported:</p>
|
@@ -214,8 +222,39 @@
|
|
214
222
|
</init>
|
215
223
|
</inits>
|
216
224
|
<keywords>
|
217
|
-
<kw name="
|
218
|
-
<arguments repr="
|
225
|
+
<kw name="Assert Href To Resource Is Valid" lineno="742">
|
226
|
+
<arguments repr="href: str, referenced_resource: dict[str, dict[str, JSON] | list[JSON] | str | bytes | int | float | bool | None]">
|
227
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="href: str">
|
228
|
+
<name>href</name>
|
229
|
+
<type name="str" typedoc="string"/>
|
230
|
+
</arg>
|
231
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="referenced_resource: dict[str, dict[str, JSON] | list[JSON] | str | bytes | int | float | bool | None]">
|
232
|
+
<name>referenced_resource</name>
|
233
|
+
<type name="dict" typedoc="dictionary">
|
234
|
+
<type name="str" typedoc="string"/>
|
235
|
+
<type name="Union" union="true">
|
236
|
+
<type name="dict" typedoc="dictionary">
|
237
|
+
<type name="str" typedoc="string"/>
|
238
|
+
<type name="JSON"/>
|
239
|
+
</type>
|
240
|
+
<type name="list" typedoc="list">
|
241
|
+
<type name="JSON"/>
|
242
|
+
</type>
|
243
|
+
<type name="str" typedoc="string"/>
|
244
|
+
<type name="bytes" typedoc="bytes"/>
|
245
|
+
<type name="int" typedoc="integer"/>
|
246
|
+
<type name="float" typedoc="float"/>
|
247
|
+
<type name="bool" typedoc="boolean"/>
|
248
|
+
<type name="None" typedoc="None"/>
|
249
|
+
</type>
|
250
|
+
</type>
|
251
|
+
</arg>
|
252
|
+
</arguments>
|
253
|
+
<doc><p>Attempt to GET the resource referenced by the <span class="name">href</span> and validate it's equal to the provided <span class="name">referenced_resource</span> object / dictionary.</p></doc>
|
254
|
+
<shortdoc>Attempt to GET the resource referenced by the `href` and validate it's equal to the provided `referenced_resource` object / dictionary.</shortdoc>
|
255
|
+
</kw>
|
256
|
+
<kw name="Authorized Request" lineno="659">
|
257
|
+
<arguments repr="url: str, method: str, params: dict[str, Any] | None = None, headers: dict[str, str] | None = None, json_data: dict[str, JSON] | list[JSON] | str | bytes | int | float | bool | None = None, data: Any | None = None, files: Any | None = None">
|
219
258
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
220
259
|
<name>url</name>
|
221
260
|
<type name="str" typedoc="string"/>
|
@@ -224,10 +263,10 @@
|
|
224
263
|
<name>method</name>
|
225
264
|
<type name="str" typedoc="string"/>
|
226
265
|
</arg>
|
227
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="params:
|
266
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="params: dict[str, Any] | None = None">
|
228
267
|
<name>params</name>
|
229
268
|
<type name="Union" union="true">
|
230
|
-
<type name="
|
269
|
+
<type name="dict" typedoc="dictionary">
|
231
270
|
<type name="str" typedoc="string"/>
|
232
271
|
<type name="Any" typedoc="Any"/>
|
233
272
|
</type>
|
@@ -235,10 +274,10 @@
|
|
235
274
|
</type>
|
236
275
|
<default>None</default>
|
237
276
|
</arg>
|
238
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="headers:
|
277
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="headers: dict[str, str] | None = None">
|
239
278
|
<name>headers</name>
|
240
279
|
<type name="Union" union="true">
|
241
|
-
<type name="
|
280
|
+
<type name="dict" typedoc="dictionary">
|
242
281
|
<type name="str" typedoc="string"/>
|
243
282
|
<type name="str" typedoc="string"/>
|
244
283
|
</type>
|
@@ -246,43 +285,18 @@
|
|
246
285
|
</type>
|
247
286
|
<default>None</default>
|
248
287
|
</arg>
|
249
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="json_data:
|
288
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="json_data: dict[str, JSON] | list[JSON] | str | bytes | int | float | bool | None = None">
|
250
289
|
<name>json_data</name>
|
251
290
|
<type name="Union" union="true">
|
252
|
-
<type name="
|
253
|
-
<type name="str" typedoc="string"/>
|
254
|
-
<type name="Union" union="true">
|
255
|
-
<type name="Dict" typedoc="dictionary">
|
291
|
+
<type name="dict" typedoc="dictionary">
|
256
292
|
<type name="str" typedoc="string"/>
|
257
293
|
<type name="JSON"/>
|
258
294
|
</type>
|
259
|
-
<type name="
|
295
|
+
<type name="list" typedoc="list">
|
260
296
|
<type name="JSON"/>
|
261
297
|
</type>
|
262
298
|
<type name="str" typedoc="string"/>
|
263
|
-
<type name="
|
264
|
-
<type name="float" typedoc="float"/>
|
265
|
-
<type name="bool" typedoc="boolean"/>
|
266
|
-
<type name="None" typedoc="None"/>
|
267
|
-
</type>
|
268
|
-
</type>
|
269
|
-
<type name="List" typedoc="list">
|
270
|
-
<type name="Union" union="true">
|
271
|
-
<type name="Dict" typedoc="dictionary">
|
272
|
-
<type name="str" typedoc="string"/>
|
273
|
-
<type name="JSON"/>
|
274
|
-
</type>
|
275
|
-
<type name="List" typedoc="list">
|
276
|
-
<type name="JSON"/>
|
277
|
-
</type>
|
278
|
-
<type name="str" typedoc="string"/>
|
279
|
-
<type name="int" typedoc="integer"/>
|
280
|
-
<type name="float" typedoc="float"/>
|
281
|
-
<type name="bool" typedoc="boolean"/>
|
282
|
-
<type name="None" typedoc="None"/>
|
283
|
-
</type>
|
284
|
-
</type>
|
285
|
-
<type name="str" typedoc="string"/>
|
299
|
+
<type name="bytes" typedoc="bytes"/>
|
286
300
|
<type name="int" typedoc="integer"/>
|
287
301
|
<type name="float" typedoc="float"/>
|
288
302
|
<type name="bool" typedoc="boolean"/>
|
@@ -290,14 +304,20 @@
|
|
290
304
|
</type>
|
291
305
|
<default>None</default>
|
292
306
|
</arg>
|
293
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="data: Any = None">
|
307
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="data: Any | None = None">
|
294
308
|
<name>data</name>
|
309
|
+
<type name="Union" union="true">
|
295
310
|
<type name="Any" typedoc="Any"/>
|
311
|
+
<type name="None" typedoc="None"/>
|
312
|
+
</type>
|
296
313
|
<default>None</default>
|
297
314
|
</arg>
|
298
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="files: Any = None">
|
315
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="files: Any | None = None">
|
299
316
|
<name>files</name>
|
317
|
+
<type name="Union" union="true">
|
300
318
|
<type name="Any" typedoc="Any"/>
|
319
|
+
<type name="None" typedoc="None"/>
|
320
|
+
</type>
|
301
321
|
<default>None</default>
|
302
322
|
</arg>
|
303
323
|
</arguments>
|
@@ -307,7 +327,7 @@
|
|
307
327
|
<p>&gt; Note: provided username / password or auth objects take precedence over token based security</p></doc>
|
308
328
|
<shortdoc>Perform a request using the security token or authentication set in the library.</shortdoc>
|
309
329
|
</kw>
|
310
|
-
<kw name="Ensure In Use" lineno="
|
330
|
+
<kw name="Ensure In Use" lineno="644">
|
311
331
|
<arguments repr="url: str, resource_relation: IdReference">
|
312
332
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
313
333
|
<name>url</name>
|
@@ -321,20 +341,20 @@
|
|
321
341
|
<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>
|
322
342
|
<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>
|
323
343
|
</kw>
|
324
|
-
<kw name="Get Ids From Url" lineno="
|
344
|
+
<kw name="Get Ids From Url" lineno="609">
|
325
345
|
<arguments repr="url: str">
|
326
346
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
327
347
|
<name>url</name>
|
328
348
|
<type name="str" typedoc="string"/>
|
329
349
|
</arg>
|
330
350
|
</arguments>
|
331
|
-
<returntype name="
|
351
|
+
<returntype name="list" typedoc="list">
|
332
352
|
<type name="str" typedoc="string"/>
|
333
353
|
</returntype>
|
334
354
|
<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>
|
335
355
|
<shortdoc>Perform a GET request on the `url` and return the list of resource `ids` from the response.</shortdoc>
|
336
356
|
</kw>
|
337
|
-
<kw name="Get Invalid Json Data" lineno="
|
357
|
+
<kw name="Get Invalid Json Data" lineno="506">
|
338
358
|
<arguments repr="url: str, method: str, status_code: int, request_data: RequestData">
|
339
359
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
340
360
|
<name>url</name>
|
@@ -353,15 +373,29 @@
|
|
353
373
|
<type name="RequestData"/>
|
354
374
|
</arg>
|
355
375
|
</arguments>
|
356
|
-
<returntype name="
|
376
|
+
<returntype name="dict" typedoc="dictionary">
|
357
377
|
<type name="str" typedoc="string"/>
|
358
|
-
<type name="
|
378
|
+
<type name="Union" union="true">
|
379
|
+
<type name="dict" typedoc="dictionary">
|
380
|
+
<type name="str" typedoc="string"/>
|
381
|
+
<type name="JSON"/>
|
382
|
+
</type>
|
383
|
+
<type name="list" typedoc="list">
|
384
|
+
<type name="JSON"/>
|
385
|
+
</type>
|
386
|
+
<type name="str" typedoc="string"/>
|
387
|
+
<type name="bytes" typedoc="bytes"/>
|
388
|
+
<type name="int" typedoc="integer"/>
|
389
|
+
<type name="float" typedoc="float"/>
|
390
|
+
<type name="bool" typedoc="boolean"/>
|
391
|
+
<type name="None" typedoc="None"/>
|
392
|
+
</type>
|
359
393
|
</returntype>
|
360
394
|
<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>
|
361
395
|
<p>&gt; Note: applicable UniquePropertyValueConstraint and IdReference Relations are considered before changes to <span class="name">json_data</span> are made.</p></doc>
|
362
396
|
<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>
|
363
397
|
</kw>
|
364
|
-
<kw name="Get Invalidated Parameters" lineno="
|
398
|
+
<kw name="Get Invalidated Parameters" lineno="529">
|
365
399
|
<arguments repr="status_code: int, request_data: RequestData">
|
366
400
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="status_code: int">
|
367
401
|
<name>status_code</name>
|
@@ -372,12 +406,26 @@
|
|
372
406
|
<type name="RequestData"/>
|
373
407
|
</arg>
|
374
408
|
</arguments>
|
375
|
-
<returntype name="
|
376
|
-
<type name="
|
409
|
+
<returntype name="tuple" typedoc="tuple">
|
410
|
+
<type name="dict" typedoc="dictionary">
|
377
411
|
<type name="str" typedoc="string"/>
|
378
|
-
<type name="
|
412
|
+
<type name="Union" union="true">
|
413
|
+
<type name="dict" typedoc="dictionary">
|
414
|
+
<type name="str" typedoc="string"/>
|
415
|
+
<type name="JSON"/>
|
416
|
+
</type>
|
417
|
+
<type name="list" typedoc="list">
|
418
|
+
<type name="JSON"/>
|
379
419
|
</type>
|
380
|
-
<type name="
|
420
|
+
<type name="str" typedoc="string"/>
|
421
|
+
<type name="bytes" typedoc="bytes"/>
|
422
|
+
<type name="int" typedoc="integer"/>
|
423
|
+
<type name="float" typedoc="float"/>
|
424
|
+
<type name="bool" typedoc="boolean"/>
|
425
|
+
<type name="None" typedoc="None"/>
|
426
|
+
</type>
|
427
|
+
</type>
|
428
|
+
<type name="dict" typedoc="dictionary">
|
381
429
|
<type name="str" typedoc="string"/>
|
382
430
|
<type name="str" typedoc="string"/>
|
383
431
|
</type>
|
@@ -385,38 +433,56 @@
|
|
385
433
|
<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>
|
386
434
|
<shortdoc>Returns a version of `params, headers` as present on `request_data` that has been modified to cause the provided `status_code`.</shortdoc>
|
387
435
|
</kw>
|
388
|
-
<kw name="Get Invalidated Url" lineno="
|
389
|
-
<arguments repr="valid_url: str">
|
436
|
+
<kw name="Get Invalidated Url" lineno="619">
|
437
|
+
<arguments repr="valid_url: str, path: str = , expected_status_code: int = 404">
|
390
438
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="valid_url: str">
|
391
439
|
<name>valid_url</name>
|
392
440
|
<type name="str" typedoc="string"/>
|
393
441
|
</arg>
|
394
|
-
|
395
|
-
<
|
442
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="path: str = ">
|
443
|
+
<name>path</name>
|
396
444
|
<type name="str" typedoc="string"/>
|
397
|
-
<
|
398
|
-
</
|
399
|
-
<
|
445
|
+
<default/>
|
446
|
+
</arg>
|
447
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="expected_status_code: int = 404">
|
448
|
+
<name>expected_status_code</name>
|
449
|
+
<type name="int" typedoc="integer"/>
|
450
|
+
<default>404</default>
|
451
|
+
</arg>
|
452
|
+
</arguments>
|
453
|
+
<returntype name="str" typedoc="string"/>
|
454
|
+
<doc><p>Return an url with all the path parameters in the <span class="name">valid_url</span> replaced by a random UUID if no PathPropertiesConstraint is mapped for the <span class="name">"get"</span> operation on the mapped <a href="#type-Path" class="name">path</a> and <span class="name">expected_status_code</span>. If a PathPropertiesConstraint is mapped, the <span class="name">invalid_value</span> is returned.</p>
|
400
455
|
<p>Raises ValueError if the valid_url cannot be invalidated.</p></doc>
|
401
|
-
<shortdoc>Return an url with all the path parameters in the `valid_url` replaced by a random UUID.</shortdoc>
|
456
|
+
<shortdoc>Return an url with all the path parameters in the `valid_url` replaced by a random UUID if no PathPropertiesConstraint is mapped for the `"get"` operation on the mapped `path` and `expected_status_code`. If a PathPropertiesConstraint is mapped, the `invalid_value` is returned.</shortdoc>
|
402
457
|
</kw>
|
403
|
-
<kw name="Get Json Data For Dto Class" lineno="
|
404
|
-
<arguments repr="schema:
|
405
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="schema:
|
458
|
+
<kw name="Get Json Data For Dto Class" lineno="489">
|
459
|
+
<arguments repr="schema: dict[str, dict[str, JSON] | list[JSON] | str | bytes | int | float | bool | None], dto_class: type[Dto], operation_id: str = ">
|
460
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="schema: dict[str, dict[str, JSON] | list[JSON] | str | bytes | int | float | bool | None]">
|
406
461
|
<name>schema</name>
|
407
|
-
<type name="
|
462
|
+
<type name="dict" typedoc="dictionary">
|
408
463
|
<type name="str" typedoc="string"/>
|
409
|
-
<type name="
|
464
|
+
<type name="Union" union="true">
|
465
|
+
<type name="dict" typedoc="dictionary">
|
466
|
+
<type name="str" typedoc="string"/>
|
467
|
+
<type name="JSON"/>
|
468
|
+
</type>
|
469
|
+
<type name="list" typedoc="list">
|
470
|
+
<type name="JSON"/>
|
471
|
+
</type>
|
472
|
+
<type name="str" typedoc="string"/>
|
473
|
+
<type name="bytes" typedoc="bytes"/>
|
474
|
+
<type name="int" typedoc="integer"/>
|
475
|
+
<type name="float" typedoc="float"/>
|
476
|
+
<type name="bool" typedoc="boolean"/>
|
477
|
+
<type name="None" typedoc="None"/>
|
478
|
+
</type>
|
410
479
|
</type>
|
411
480
|
</arg>
|
412
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="dto_class:
|
481
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="dto_class: type[Dto]">
|
413
482
|
<name>dto_class</name>
|
414
|
-
<type name="
|
415
|
-
<type name="Dto"/>
|
416
|
-
<type name="Type">
|
483
|
+
<type name="type">
|
417
484
|
<type name="Dto"/>
|
418
485
|
</type>
|
419
|
-
</type>
|
420
486
|
</arg>
|
421
487
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="operation_id: str = ">
|
422
488
|
<name>operation_id</name>
|
@@ -425,16 +491,24 @@
|
|
425
491
|
</arg>
|
426
492
|
</arguments>
|
427
493
|
<returntype name="Union" union="true">
|
428
|
-
<type name="
|
494
|
+
<type name="dict" typedoc="dictionary">
|
429
495
|
<type name="str" typedoc="string"/>
|
430
|
-
<type name="
|
496
|
+
<type name="JSON"/>
|
497
|
+
</type>
|
498
|
+
<type name="list" typedoc="list">
|
499
|
+
<type name="JSON"/>
|
431
500
|
</type>
|
501
|
+
<type name="str" typedoc="string"/>
|
502
|
+
<type name="bytes" typedoc="bytes"/>
|
503
|
+
<type name="int" typedoc="integer"/>
|
504
|
+
<type name="float" typedoc="float"/>
|
505
|
+
<type name="bool" typedoc="boolean"/>
|
432
506
|
<type name="None" typedoc="None"/>
|
433
507
|
</returntype>
|
434
|
-
<doc><p>Generate
|
435
|
-
<shortdoc>Generate
|
508
|
+
<doc><p>Generate valid (json-compatible) data for the <span class="name">dto_class</span>.</p></doc>
|
509
|
+
<shortdoc>Generate valid (json-compatible) data for the `dto_class`.</shortdoc>
|
436
510
|
</kw>
|
437
|
-
<kw name="Get Json Data With Conflict" lineno="
|
511
|
+
<kw name="Get Json Data With Conflict" lineno="545">
|
438
512
|
<arguments repr="url: str, method: str, dto: Dto, conflict_status_code: int">
|
439
513
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
440
514
|
<name>url</name>
|
@@ -453,14 +527,28 @@
|
|
453
527
|
<type name="int" typedoc="integer"/>
|
454
528
|
</arg>
|
455
529
|
</arguments>
|
456
|
-
<returntype name="
|
530
|
+
<returntype name="dict" typedoc="dictionary">
|
457
531
|
<type name="str" typedoc="string"/>
|
458
|
-
<type name="
|
532
|
+
<type name="Union" union="true">
|
533
|
+
<type name="dict" typedoc="dictionary">
|
534
|
+
<type name="str" typedoc="string"/>
|
535
|
+
<type name="JSON"/>
|
536
|
+
</type>
|
537
|
+
<type name="list" typedoc="list">
|
538
|
+
<type name="JSON"/>
|
539
|
+
</type>
|
540
|
+
<type name="str" typedoc="string"/>
|
541
|
+
<type name="bytes" typedoc="bytes"/>
|
542
|
+
<type name="int" typedoc="integer"/>
|
543
|
+
<type name="float" typedoc="float"/>
|
544
|
+
<type name="bool" typedoc="boolean"/>
|
545
|
+
<type name="None" typedoc="None"/>
|
546
|
+
</type>
|
459
547
|
</returntype>
|
460
548
|
<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>
|
461
549
|
<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>
|
462
550
|
</kw>
|
463
|
-
<kw name="Get Parameterized
|
551
|
+
<kw name="Get Parameterized Path From Url" lineno="595">
|
464
552
|
<arguments repr="url: str">
|
465
553
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
466
554
|
<name>url</name>
|
@@ -468,13 +556,13 @@
|
|
468
556
|
</arg>
|
469
557
|
</arguments>
|
470
558
|
<returntype name="str" typedoc="string"/>
|
471
|
-
<doc><p>Return the
|
472
|
-
<shortdoc>Return the
|
559
|
+
<doc><p>Return the path as found in the <span class="name">paths</span> section based on the given <span class="name">url</span>.</p></doc>
|
560
|
+
<shortdoc>Return the path as found in the `paths` section based on the given `url`.</shortdoc>
|
473
561
|
</kw>
|
474
|
-
<kw name="Get Request Data" lineno="
|
475
|
-
<arguments repr="
|
476
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="
|
477
|
-
<name>
|
562
|
+
<kw name="Get Request Data" lineno="478">
|
563
|
+
<arguments repr="path: str, method: str">
|
564
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
565
|
+
<name>path</name>
|
478
566
|
<type name="str" typedoc="string"/>
|
479
567
|
</arg>
|
480
568
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="method: str">
|
@@ -486,45 +574,60 @@
|
|
486
574
|
<doc><p>Return an object with valid request data for body, headers and query params.</p></doc>
|
487
575
|
<shortdoc>Return an object with valid request data for body, headers and query params.</shortdoc>
|
488
576
|
</kw>
|
489
|
-
<kw name="Get
|
490
|
-
<arguments repr="
|
491
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="
|
492
|
-
<name>
|
577
|
+
<kw name="Get Request Values" lineno="437">
|
578
|
+
<arguments repr="path: str, method: str, overrides: Mapping[str, object] = {}">
|
579
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
580
|
+
<name>path</name>
|
493
581
|
<type name="str" typedoc="string"/>
|
494
582
|
</arg>
|
495
583
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="method: str">
|
496
584
|
<name>method</name>
|
497
585
|
<type name="str" typedoc="string"/>
|
498
586
|
</arg>
|
587
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="overrides: Mapping[str, object] = {}">
|
588
|
+
<name>overrides</name>
|
589
|
+
<type name="Mapping" typedoc="dictionary">
|
590
|
+
<type name="str" typedoc="string"/>
|
591
|
+
<type name="object"/>
|
592
|
+
</type>
|
593
|
+
<default>{}</default>
|
594
|
+
</arg>
|
595
|
+
</arguments>
|
596
|
+
<returntype name="RequestValues"/>
|
597
|
+
<doc><p>Return an object with all (valid) request values needed to make a request.</p></doc>
|
598
|
+
<shortdoc>Return an object with all (valid) request values needed to make a request.</shortdoc>
|
599
|
+
</kw>
|
600
|
+
<kw name="Get Valid Id For Path" lineno="583">
|
601
|
+
<arguments repr="path: str">
|
602
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
603
|
+
<name>path</name>
|
604
|
+
<type name="str" typedoc="string"/>
|
605
|
+
</arg>
|
499
606
|
</arguments>
|
500
607
|
<returntype name="Union" union="true">
|
501
608
|
<type name="str" typedoc="string"/>
|
502
609
|
<type name="int" typedoc="integer"/>
|
503
610
|
<type name="float" typedoc="float"/>
|
504
611
|
</returntype>
|
505
|
-
<doc><p>Support keyword that returns the <span class="name">id</span> for an existing resource at <
|
506
|
-
<p>To prevent resource conflicts with other test cases, a new resource is created (POST) if possible.</p></doc>
|
507
|
-
<shortdoc>Support keyword that returns the `id` for an existing resource at `
|
612
|
+
<doc><p>Support keyword that returns the <span class="name">id</span> for an existing resource at <a href="#type-Path" class="name">path</a>.</p>
|
613
|
+
<p>To prevent resource conflicts with other test cases, a new resource is created (by a POST operation) if possible.</p></doc>
|
614
|
+
<shortdoc>Support keyword that returns the `id` for an existing resource at `path`.</shortdoc>
|
508
615
|
</kw>
|
509
|
-
<kw name="Get Valid Url" lineno="
|
510
|
-
<arguments repr="
|
511
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="
|
512
|
-
<name>
|
513
|
-
<type name="str" typedoc="string"/>
|
514
|
-
</arg>
|
515
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="method: str">
|
516
|
-
<name>method</name>
|
616
|
+
<kw name="Get Valid Url" lineno="564">
|
617
|
+
<arguments repr="path: str">
|
618
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
619
|
+
<name>path</name>
|
517
620
|
<type name="str" typedoc="string"/>
|
518
621
|
</arg>
|
519
622
|
</arguments>
|
520
623
|
<returntype name="str" typedoc="string"/>
|
521
|
-
<doc><p>This keyword returns a valid url for the given <
|
522
|
-
<p>If the <
|
523
|
-
<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-
|
524
|
-
<shortdoc>This keyword returns a valid url for the given `
|
624
|
+
<doc><p>This keyword returns a valid url for the given <a href="#type-Path" class="name">path</a>.</p>
|
625
|
+
<p>If the <a href="#type-Path" class="name">path</a> contains path parameters the Get Valid Id For Path keyword will be executed to retrieve valid ids for the path parameters.</p>
|
626
|
+
<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-openapitools/advanced_use.html">here</a>.</p></doc>
|
627
|
+
<shortdoc>This keyword returns a valid url for the given `path`.</shortdoc>
|
525
628
|
</kw>
|
526
|
-
<kw name="Perform Validated Request" lineno="
|
527
|
-
<arguments repr="path: str, status_code: int, request_values: RequestValues, original_data:
|
629
|
+
<kw name="Perform Validated Request" lineno="708">
|
630
|
+
<arguments repr="path: str, status_code: int, request_values: RequestValues, original_data: Mapping[str, object] = {}">
|
528
631
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
529
632
|
<name>path</name>
|
530
633
|
<type name="str" typedoc="string"/>
|
@@ -537,22 +640,19 @@
|
|
537
640
|
<name>request_values</name>
|
538
641
|
<type name="RequestValues"/>
|
539
642
|
</arg>
|
540
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data:
|
643
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data: Mapping[str, object] = {}">
|
541
644
|
<name>original_data</name>
|
542
|
-
<type name="
|
543
|
-
<type name="Dict" typedoc="dictionary">
|
645
|
+
<type name="Mapping" typedoc="dictionary">
|
544
646
|
<type name="str" typedoc="string"/>
|
545
|
-
<type name="
|
546
|
-
</type>
|
547
|
-
<type name="None" typedoc="None"/>
|
647
|
+
<type name="object"/>
|
548
648
|
</type>
|
549
|
-
<default>
|
649
|
+
<default>{}</default>
|
550
650
|
</arg>
|
551
651
|
</arguments>
|
552
652
|
<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>
|
553
653
|
<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>
|
554
654
|
</kw>
|
555
|
-
<kw name="Set Auth" lineno="
|
655
|
+
<kw name="Set Auth" lineno="415">
|
556
656
|
<arguments repr="auth: AuthBase">
|
557
657
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="auth: AuthBase">
|
558
658
|
<name>auth</name>
|
@@ -563,7 +663,7 @@
|
|
563
663
|
<p>After calling this keyword, subsequent requests will use the provided <span class="name">auth</span> instance.</p></doc>
|
564
664
|
<shortdoc>Set the `auth` used for authentication after the library is imported.</shortdoc>
|
565
665
|
</kw>
|
566
|
-
<kw name="Set Basic Auth" lineno="
|
666
|
+
<kw name="Set Basic Auth" lineno="403">
|
567
667
|
<arguments repr="username: str, password: str">
|
568
668
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="username: str">
|
569
669
|
<name>username</name>
|
@@ -578,11 +678,11 @@
|
|
578
678
|
<p>After calling this keyword, subsequent requests will use the provided credentials.</p></doc>
|
579
679
|
<shortdoc>Set the `username` and `password` used for basic authentication after the library is imported.</shortdoc>
|
580
680
|
</kw>
|
581
|
-
<kw name="Set Extra Headers" lineno="
|
582
|
-
<arguments repr="extra_headers:
|
583
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="extra_headers:
|
681
|
+
<kw name="Set Extra Headers" lineno="425">
|
682
|
+
<arguments repr="extra_headers: dict[str, str]">
|
683
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="extra_headers: dict[str, str]">
|
584
684
|
<name>extra_headers</name>
|
585
|
-
<type name="
|
685
|
+
<type name="dict" typedoc="dictionary">
|
586
686
|
<type name="str" typedoc="string"/>
|
587
687
|
<type name="str" typedoc="string"/>
|
588
688
|
</type>
|
@@ -592,7 +692,7 @@
|
|
592
692
|
<p>After calling this keyword, subsequent requests will use the provided <span class="name">extra_headers</span>.</p></doc>
|
593
693
|
<shortdoc>Set the `extra_headers` used in requests after the library is imported.</shortdoc>
|
594
694
|
</kw>
|
595
|
-
<kw name="Set Origin" lineno="
|
695
|
+
<kw name="Set Origin" lineno="380">
|
596
696
|
<arguments repr="origin: str">
|
597
697
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="origin: str">
|
598
698
|
<name>origin</name>
|
@@ -604,7 +704,7 @@
|
|
604
704
|
<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>
|
605
705
|
<shortdoc>Set the `origin` after the library is imported.</shortdoc>
|
606
706
|
</kw>
|
607
|
-
<kw name="Set Security Token" lineno="
|
707
|
+
<kw name="Set Security Token" lineno="394">
|
608
708
|
<arguments repr="security_token: str">
|
609
709
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="security_token: str">
|
610
710
|
<name>security_token</name>
|
@@ -615,28 +715,56 @@
|
|
615
715
|
<p>After calling this keyword, subsequent requests will use the provided token.</p></doc>
|
616
716
|
<shortdoc>Set the `security_token` after the library is imported.</shortdoc>
|
617
717
|
</kw>
|
618
|
-
<kw name="Validate Resource Properties" lineno="
|
619
|
-
<arguments repr="resource:
|
620
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="resource:
|
718
|
+
<kw name="Validate Resource Properties" lineno="786">
|
719
|
+
<arguments repr="resource: dict[str, dict[str, JSON] | list[JSON] | str | bytes | int | float | bool | None], schema: dict[str, dict[str, JSON] | list[JSON] | str | bytes | int | float | bool | None]">
|
720
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="resource: dict[str, dict[str, JSON] | list[JSON] | str | bytes | int | float | bool | None]">
|
621
721
|
<name>resource</name>
|
622
|
-
<type name="
|
722
|
+
<type name="dict" typedoc="dictionary">
|
623
723
|
<type name="str" typedoc="string"/>
|
624
|
-
<type name="
|
724
|
+
<type name="Union" union="true">
|
725
|
+
<type name="dict" typedoc="dictionary">
|
726
|
+
<type name="str" typedoc="string"/>
|
727
|
+
<type name="JSON"/>
|
728
|
+
</type>
|
729
|
+
<type name="list" typedoc="list">
|
730
|
+
<type name="JSON"/>
|
731
|
+
</type>
|
732
|
+
<type name="str" typedoc="string"/>
|
733
|
+
<type name="bytes" typedoc="bytes"/>
|
734
|
+
<type name="int" typedoc="integer"/>
|
735
|
+
<type name="float" typedoc="float"/>
|
736
|
+
<type name="bool" typedoc="boolean"/>
|
737
|
+
<type name="None" typedoc="None"/>
|
738
|
+
</type>
|
625
739
|
</type>
|
626
740
|
</arg>
|
627
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="schema:
|
741
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="schema: dict[str, dict[str, JSON] | list[JSON] | str | bytes | int | float | bool | None]">
|
628
742
|
<name>schema</name>
|
629
|
-
<type name="
|
743
|
+
<type name="dict" typedoc="dictionary">
|
630
744
|
<type name="str" typedoc="string"/>
|
631
|
-
<type name="
|
745
|
+
<type name="Union" union="true">
|
746
|
+
<type name="dict" typedoc="dictionary">
|
747
|
+
<type name="str" typedoc="string"/>
|
748
|
+
<type name="JSON"/>
|
749
|
+
</type>
|
750
|
+
<type name="list" typedoc="list">
|
751
|
+
<type name="JSON"/>
|
752
|
+
</type>
|
753
|
+
<type name="str" typedoc="string"/>
|
754
|
+
<type name="bytes" typedoc="bytes"/>
|
755
|
+
<type name="int" typedoc="integer"/>
|
756
|
+
<type name="float" typedoc="float"/>
|
757
|
+
<type name="bool" typedoc="boolean"/>
|
758
|
+
<type name="None" typedoc="None"/>
|
759
|
+
</type>
|
632
760
|
</type>
|
633
761
|
</arg>
|
634
762
|
</arguments>
|
635
763
|
<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>
|
636
764
|
<shortdoc>Validate that the `resource` does not contain any properties that are not defined in the `schema_properties`.</shortdoc>
|
637
765
|
</kw>
|
638
|
-
<kw name="Validate Response" lineno="
|
639
|
-
<arguments repr="path: str, response: Response, original_data:
|
766
|
+
<kw name="Validate Response" lineno="757">
|
767
|
+
<arguments repr="path: str, response: Response, original_data: Mapping[str, object] = {}">
|
640
768
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
641
769
|
<name>path</name>
|
642
770
|
<type name="str" typedoc="string"/>
|
@@ -645,45 +773,53 @@
|
|
645
773
|
<name>response</name>
|
646
774
|
<type name="Response"/>
|
647
775
|
</arg>
|
648
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data:
|
776
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data: Mapping[str, object] = {}">
|
649
777
|
<name>original_data</name>
|
650
|
-
<type name="
|
651
|
-
<type name="Dict" typedoc="dictionary">
|
778
|
+
<type name="Mapping" typedoc="dictionary">
|
652
779
|
<type name="str" typedoc="string"/>
|
653
|
-
<type name="
|
780
|
+
<type name="object"/>
|
654
781
|
</type>
|
655
|
-
<
|
656
|
-
</type>
|
657
|
-
<default>None</default>
|
782
|
+
<default>{}</default>
|
658
783
|
</arg>
|
659
784
|
</arguments>
|
660
785
|
<doc><p>Validate the <span class="name">response</span> by performing the following validations:</p>
|
661
786
|
<ul>
|
662
|
-
<li>validate the <span class="name">response</span> against the openapi schema for the <
|
787
|
+
<li>validate the <span class="name">response</span> against the openapi schema for the <a href="#type-Path" class="name">path</a></li>
|
663
788
|
<li>validate that the response does not contain extra properties</li>
|
664
789
|
<li>validate that a href, if present, refers to the correct resource</li>
|
665
790
|
<li>validate that the value for a property that is in the response is equal to the property value that was send</li>
|
666
791
|
<li>validate that no <span class="name">original_data</span> is preserved when performing a PUT operation</li>
|
667
792
|
<li>validate that a PATCH operation only updates the provided properties</li>
|
668
793
|
</ul></doc>
|
669
|
-
<shortdoc>Validate the `response` by performing the following validations: - validate the `response` against the openapi schema for the `
|
794
|
+
<shortdoc>Validate the `response` by performing the following validations: - validate the `response` against the openapi schema for the `path` - 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>
|
670
795
|
</kw>
|
671
|
-
<kw name="Validate
|
672
|
-
<arguments repr="
|
796
|
+
<kw name="Validate Response Using Validator" lineno="728">
|
797
|
+
<arguments repr="request: RequestsOpenAPIRequest, response: RequestsOpenAPIResponse">
|
798
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="request: RequestsOpenAPIRequest">
|
799
|
+
<name>request</name>
|
800
|
+
<type name="RequestsOpenAPIRequest"/>
|
801
|
+
</arg>
|
802
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="response: RequestsOpenAPIResponse">
|
803
|
+
<name>response</name>
|
804
|
+
<type name="RequestsOpenAPIResponse"/>
|
805
|
+
</arg>
|
806
|
+
</arguments>
|
807
|
+
<doc><p>Validate the <span class="name">response</span> for a given <span class="name">request</span> against the OpenAPI Spec that is loaded during library initialization.</p></doc>
|
808
|
+
<shortdoc>Validate the `response` for a given `request` against the OpenAPI Spec that is loaded during library initialization.</shortdoc>
|
809
|
+
</kw>
|
810
|
+
<kw name="Validate Send Response" lineno="800">
|
811
|
+
<arguments repr="response: Response, original_data: Mapping[str, object] = {}">
|
673
812
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="response: Response">
|
674
813
|
<name>response</name>
|
675
814
|
<type name="Response"/>
|
676
815
|
</arg>
|
677
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data:
|
816
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data: Mapping[str, object] = {}">
|
678
817
|
<name>original_data</name>
|
679
|
-
<type name="
|
680
|
-
<type name="Dict" typedoc="dictionary">
|
818
|
+
<type name="Mapping" typedoc="dictionary">
|
681
819
|
<type name="str" typedoc="string"/>
|
682
|
-
<type name="
|
820
|
+
<type name="object"/>
|
683
821
|
</type>
|
684
|
-
<
|
685
|
-
</type>
|
686
|
-
<default>None</default>
|
822
|
+
<default>{}</default>
|
687
823
|
</arg>
|
688
824
|
</arguments>
|
689
825
|
<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>
|
@@ -697,16 +833,7 @@
|
|
697
833
|
<type>Any</type>
|
698
834
|
</accepts>
|
699
835
|
<usages>
|
700
|
-
<usage>__init__</usage>
|
701
836
|
<usage>Authorized Request</usage>
|
702
|
-
<usage>Get Invalid Json Data</usage>
|
703
|
-
<usage>Get Invalidated Parameters</usage>
|
704
|
-
<usage>Get Json Data For Dto Class</usage>
|
705
|
-
<usage>Get Json Data With Conflict</usage>
|
706
|
-
<usage>Perform Validated Request</usage>
|
707
|
-
<usage>Validate Resource Properties</usage>
|
708
|
-
<usage>Validate Response</usage>
|
709
|
-
<usage>Validate Send Response</usage>
|
710
837
|
</usages>
|
711
838
|
</type>
|
712
839
|
<type name="boolean" type="Standard">
|
@@ -720,7 +847,31 @@
|
|
720
847
|
</accepts>
|
721
848
|
<usages>
|
722
849
|
<usage>__init__</usage>
|
850
|
+
<usage>Assert Href To Resource Is Valid</usage>
|
851
|
+
<usage>Authorized Request</usage>
|
852
|
+
<usage>Get Invalid Json Data</usage>
|
853
|
+
<usage>Get Invalidated Parameters</usage>
|
854
|
+
<usage>Get Json Data For Dto Class</usage>
|
855
|
+
<usage>Get Json Data With Conflict</usage>
|
856
|
+
<usage>Validate Resource Properties</usage>
|
857
|
+
</usages>
|
858
|
+
</type>
|
859
|
+
<type name="bytes" type="Standard">
|
860
|
+
<doc><p>Strings are converted to bytes so that each Unicode code point below 256 is directly mapped to a matching byte. Higher code points are not allowed. Robot Framework's <code>\xHH</code> escape syntax is convenient with bytes having non-printable values.</p>
|
861
|
+
<p>Examples: <code>good</code>, <code>hyvä</code> (same as <code>hyv\xE4</code>), <code>\x00</code> (the null byte)</p></doc>
|
862
|
+
<accepts>
|
863
|
+
<type>string</type>
|
864
|
+
<type>bytearray</type>
|
865
|
+
</accepts>
|
866
|
+
<usages>
|
867
|
+
<usage>__init__</usage>
|
868
|
+
<usage>Assert Href To Resource Is Valid</usage>
|
723
869
|
<usage>Authorized Request</usage>
|
870
|
+
<usage>Get Invalid Json Data</usage>
|
871
|
+
<usage>Get Invalidated Parameters</usage>
|
872
|
+
<usage>Get Json Data For Dto Class</usage>
|
873
|
+
<usage>Get Json Data With Conflict</usage>
|
874
|
+
<usage>Validate Resource Properties</usage>
|
724
875
|
</usages>
|
725
876
|
</type>
|
726
877
|
<type name="dictionary" type="Standard">
|
@@ -733,11 +884,13 @@
|
|
733
884
|
</accepts>
|
734
885
|
<usages>
|
735
886
|
<usage>__init__</usage>
|
887
|
+
<usage>Assert Href To Resource Is Valid</usage>
|
736
888
|
<usage>Authorized Request</usage>
|
737
889
|
<usage>Get Invalid Json Data</usage>
|
738
890
|
<usage>Get Invalidated Parameters</usage>
|
739
891
|
<usage>Get Json Data For Dto Class</usage>
|
740
892
|
<usage>Get Json Data With Conflict</usage>
|
893
|
+
<usage>Get Request Values</usage>
|
741
894
|
<usage>Perform Validated Request</usage>
|
742
895
|
<usage>Set Extra Headers</usage>
|
743
896
|
<usage>Validate Resource Properties</usage>
|
@@ -754,8 +907,15 @@
|
|
754
907
|
<type>Real</type>
|
755
908
|
</accepts>
|
756
909
|
<usages>
|
910
|
+
<usage>__init__</usage>
|
911
|
+
<usage>Assert Href To Resource Is Valid</usage>
|
757
912
|
<usage>Authorized Request</usage>
|
758
|
-
<usage>Get
|
913
|
+
<usage>Get Invalid Json Data</usage>
|
914
|
+
<usage>Get Invalidated Parameters</usage>
|
915
|
+
<usage>Get Json Data For Dto Class</usage>
|
916
|
+
<usage>Get Json Data With Conflict</usage>
|
917
|
+
<usage>Get Valid Id For Path</usage>
|
918
|
+
<usage>Validate Resource Properties</usage>
|
759
919
|
</usages>
|
760
920
|
</type>
|
761
921
|
<type name="integer" type="Standard">
|
@@ -769,12 +929,16 @@
|
|
769
929
|
</accepts>
|
770
930
|
<usages>
|
771
931
|
<usage>__init__</usage>
|
932
|
+
<usage>Assert Href To Resource Is Valid</usage>
|
772
933
|
<usage>Authorized Request</usage>
|
773
934
|
<usage>Get Invalid Json Data</usage>
|
774
935
|
<usage>Get Invalidated Parameters</usage>
|
936
|
+
<usage>Get Invalidated Url</usage>
|
937
|
+
<usage>Get Json Data For Dto Class</usage>
|
775
938
|
<usage>Get Json Data With Conflict</usage>
|
776
|
-
<usage>Get Valid Id For
|
939
|
+
<usage>Get Valid Id For Path</usage>
|
777
940
|
<usage>Perform Validated Request</usage>
|
941
|
+
<usage>Validate Resource Properties</usage>
|
778
942
|
</usages>
|
779
943
|
</type>
|
780
944
|
<type name="list" type="Standard">
|
@@ -787,8 +951,14 @@
|
|
787
951
|
</accepts>
|
788
952
|
<usages>
|
789
953
|
<usage>__init__</usage>
|
954
|
+
<usage>Assert Href To Resource Is Valid</usage>
|
790
955
|
<usage>Authorized Request</usage>
|
791
956
|
<usage>Get Ids From Url</usage>
|
957
|
+
<usage>Get Invalid Json Data</usage>
|
958
|
+
<usage>Get Invalidated Parameters</usage>
|
959
|
+
<usage>Get Json Data For Dto Class</usage>
|
960
|
+
<usage>Get Json Data With Conflict</usage>
|
961
|
+
<usage>Validate Resource Properties</usage>
|
792
962
|
</usages>
|
793
963
|
</type>
|
794
964
|
<type name="None" type="Standard">
|
@@ -798,12 +968,13 @@
|
|
798
968
|
</accepts>
|
799
969
|
<usages>
|
800
970
|
<usage>__init__</usage>
|
971
|
+
<usage>Assert Href To Resource Is Valid</usage>
|
801
972
|
<usage>Authorized Request</usage>
|
802
|
-
<usage>Get
|
973
|
+
<usage>Get Invalid Json Data</usage>
|
974
|
+
<usage>Get Invalidated Parameters</usage>
|
803
975
|
<usage>Get Json Data For Dto Class</usage>
|
804
|
-
<usage>
|
805
|
-
<usage>Validate
|
806
|
-
<usage>Validate Send Response</usage>
|
976
|
+
<usage>Get Json Data With Conflict</usage>
|
977
|
+
<usage>Validate Resource Properties</usage>
|
807
978
|
</usages>
|
808
979
|
</type>
|
809
980
|
<type name="Path" type="Standard">
|
@@ -824,6 +995,7 @@
|
|
824
995
|
</accepts>
|
825
996
|
<usages>
|
826
997
|
<usage>__init__</usage>
|
998
|
+
<usage>Assert Href To Resource Is Valid</usage>
|
827
999
|
<usage>Authorized Request</usage>
|
828
1000
|
<usage>Ensure In Use</usage>
|
829
1001
|
<usage>Get Ids From Url</usage>
|
@@ -832,9 +1004,10 @@
|
|
832
1004
|
<usage>Get Invalidated Url</usage>
|
833
1005
|
<usage>Get Json Data For Dto Class</usage>
|
834
1006
|
<usage>Get Json Data With Conflict</usage>
|
835
|
-
<usage>Get Parameterized
|
1007
|
+
<usage>Get Parameterized Path From Url</usage>
|
836
1008
|
<usage>Get Request Data</usage>
|
837
|
-
<usage>Get
|
1009
|
+
<usage>Get Request Values</usage>
|
1010
|
+
<usage>Get Valid Id For Path</usage>
|
838
1011
|
<usage>Get Valid Url</usage>
|
839
1012
|
<usage>Perform Validated Request</usage>
|
840
1013
|
<usage>Set Basic Auth</usage>
|