robotframework-openapitools 1.0.0b5__py3-none-any.whl → 1.0.1__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 +1 -0
- OpenApiDriver/openapi_executors.py +25 -1
- OpenApiDriver/openapidriver.libspec +183 -80
- OpenApiDriver/openapidriver.py +8 -279
- OpenApiLibCore/__init__.py +26 -0
- OpenApiLibCore/openapi_libcore.libspec +229 -121
- OpenApiLibCore/openapi_libcore.py +10 -248
- openapi_libgen/__init__.py +3 -0
- openapi_libgen/generator.py +0 -2
- openapitools_docs/__init__.py +0 -0
- openapitools_docs/docstrings.py +891 -0
- openapitools_docs/documentation_generator.py +35 -0
- openapitools_docs/templates/documentation.jinja +209 -0
- {robotframework_openapitools-1.0.0b5.dist-info → robotframework_openapitools-1.0.1.dist-info}/METADATA +16 -98
- {robotframework_openapitools-1.0.0b5.dist-info → robotframework_openapitools-1.0.1.dist-info}/RECORD +18 -14
- {robotframework_openapitools-1.0.0b5.dist-info → robotframework_openapitools-1.0.1.dist-info}/LICENSE +0 -0
- {robotframework_openapitools-1.0.0b5.dist-info → robotframework_openapitools-1.0.1.dist-info}/WHEEL +0 -0
- {robotframework_openapitools-1.0.0b5.dist-info → robotframework_openapitools-1.0.1.dist-info}/entry_points.txt +0 -0
@@ -1,12 +1,13 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<keywordspec name="OpenApiLibCore" type="LIBRARY" format="HTML" scope="SUITE" generated="2025-
|
3
|
-
<version>1.0.
|
4
|
-
<doc
|
5
|
-
|
2
|
+
<keywordspec name="OpenApiLibCore" type="LIBRARY" format="HTML" scope="SUITE" generated="2025-09-12T09:00:16+00:00" specversion="6" source="/workspaces/robotframework-openapitools/src/OpenApiLibCore/openapi_libcore.py" lineno="59">
|
3
|
+
<version>1.0.1</version>
|
4
|
+
<doc>The OpenApiLibCore library provides the keywords and core logic to interact with an OpenAPI server.
|
5
|
+
|
6
|
+
Visit the <a href="./index.html" target="_blank">OpenApiTools documentation</a> for an introduction.</doc>
|
6
7
|
<tags>
|
7
8
|
</tags>
|
8
9
|
<inits>
|
9
|
-
<init name="__init__" lineno="
|
10
|
+
<init name="__init__" lineno="60">
|
10
11
|
<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: JSON = {}, 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
12
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="source: str">
|
12
13
|
<name>source</name>
|
@@ -149,66 +150,129 @@
|
|
149
150
|
<default>None</default>
|
150
151
|
</arg>
|
151
152
|
</arguments>
|
152
|
-
<doc><
|
153
|
-
|
154
|
-
<
|
155
|
-
|
156
|
-
|
157
|
-
<
|
158
|
-
|
159
|
-
|
160
|
-
<
|
161
|
-
|
153
|
+
<doc><h2>Base parameters</h2>
|
154
|
+
|
155
|
+
<h3>source</h3>
|
156
|
+
An absolute path to an openapi.json or openapi.yaml file or an url to such a file.
|
157
|
+
|
158
|
+
<h3>origin</h3>
|
159
|
+
The server (and port) of the target server. E.g. <code>https://localhost:8000</code>
|
160
|
+
|
161
|
+
<h3>base_path</h3>
|
162
|
+
The routing between <code>origin</code> and the paths as found in the <code>paths</code>
|
163
|
+
section in the openapi document.
|
164
|
+
E.g. <code>/petshop/v2</code>.
|
165
|
+
|
166
|
+
<h2>Test case execution</h2>
|
167
|
+
|
168
|
+
<h3>response_validation</h3>
|
169
|
+
By default, a <code>WARN</code> is logged when the Response received after a Request
|
170
|
+
does not comply with the schema as defined in the OpenAPI document for the given operation.
|
171
|
+
The following values are supported:
|
162
172
|
<ul>
|
163
173
|
<li><code>DISABLED</code>: All Response validation errors will be ignored</li>
|
164
174
|
<li><code>INFO</code>: Any Response validation erros will be logged at <code>INFO</code> level</li>
|
165
175
|
<li><code>WARN</code>: Any Response validation erros will be logged at <code>WARN</code> level</li>
|
166
176
|
<li><code>STRICT</code>: The Test Case will fail on any Response validation errors</li>
|
167
177
|
</ul>
|
168
|
-
|
169
|
-
<
|
170
|
-
<
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
<
|
175
|
-
|
176
|
-
|
177
|
-
<
|
178
|
-
|
179
|
-
<
|
180
|
-
|
181
|
-
|
182
|
-
<h3>
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
<
|
189
|
-
|
190
|
-
|
191
|
-
<
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
<
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
<
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
178
|
+
|
179
|
+
<h3>disable_server_validation</h3>
|
180
|
+
If enabled by setting this parameter to <code class="language-robotframework">${TRUE}</code>,
|
181
|
+
the Response validation will also include possible errors for Requests made to a server
|
182
|
+
address that is not defined in the list of servers in the OpenAPI document.
|
183
|
+
This generally means that if there is a mismatch, every Test Case will raise this error.
|
184
|
+
Note that <code>localhost</code> and <code>127.0.0.1</code> are not considered the same
|
185
|
+
by Response validation.
|
186
|
+
|
187
|
+
<h2>API-specific configurations</h2>
|
188
|
+
|
189
|
+
<h3>mappings_path</h3>
|
190
|
+
See the Advanced Use tab for an in-depth explanation.
|
191
|
+
|
192
|
+
<h3>invalid_property_default_response</h3>
|
193
|
+
The default response code for requests with a JSON body that does not comply
|
194
|
+
with the schema.
|
195
|
+
Example: a value outside the specified range or a string value
|
196
|
+
for a property defined as integer in the schema.
|
197
|
+
|
198
|
+
<h3>default_id_property_name</h3>
|
199
|
+
The default name for the property that identifies a resource (i.e. a unique
|
200
|
+
entity) within the API.
|
201
|
+
The default value for this property name is <code>id</code>.
|
202
|
+
If the target API uses a different name for all the resources within the API,
|
203
|
+
you can configure it globally using this property.
|
204
|
+
|
205
|
+
If different property names are used for the unique identifier for different
|
206
|
+
types of resources, an <code>ID_MAPPING</code> can be implemented using the <code>mappings_path</code>.
|
207
|
+
|
208
|
+
<h3>faker_locale</h3>
|
209
|
+
A locale string or list of locale strings to pass to the Faker library to be
|
210
|
+
used in generation of string data for supported format types.
|
211
|
+
|
212
|
+
<h3>require_body_for_invalid_url</h3>
|
213
|
+
When a request is made against an invalid url, this usually is because of a "404" request;
|
214
|
+
a request for a resource that does not exist. Depending on API implementation, when a
|
215
|
+
request with a missing or invalid request body is made on a non-existent resource,
|
216
|
+
either a 404 or a 422 or 400 Response is normally returned. If the API being tested
|
217
|
+
processes the request body before checking if the requested resource exists, set
|
218
|
+
this parameter to True.
|
219
|
+
|
220
|
+
<h2>Parsing parameters</h2>
|
221
|
+
|
222
|
+
<h3>recursion_limit</h3>
|
223
|
+
The recursion depth to which to fully parse recursive references before the
|
224
|
+
<code>recursion_default</code> is used to end the recursion.
|
225
|
+
|
226
|
+
<h3>recursion_default</h3>
|
227
|
+
The value that is used instead of the referenced schema when the
|
228
|
+
<code>recursion_limit</code> has been reached.
|
229
|
+
The default <code class="language-python">{}</code> represents an empty object in JSON.
|
230
|
+
Depending on schema definitions, this may cause schema validation errors.
|
231
|
+
If this is the case <code class="language-robotframework">${NONE}</code> or an empty list
|
232
|
+
can be tried as an alternative.
|
233
|
+
|
234
|
+
<h2>Security-related parameters</h2>
|
235
|
+
<blockquote><i>Note: these parameters are equivalent to those in the <code>requests</code> library.</i></blockquote>
|
236
|
+
|
237
|
+
<h3>username</h3>
|
238
|
+
The username to be used for Basic Authentication.
|
239
|
+
|
240
|
+
<h3>password</h3>
|
241
|
+
The password to be used for Basic Authentication.
|
242
|
+
|
243
|
+
<h3>security_token</h3>
|
244
|
+
The token to be used for token based security using the <code>Authorization</code> header.
|
245
|
+
|
246
|
+
<h3>auth</h3>
|
247
|
+
A <a href="https://requests.readthedocs.io/en/latest/api/#authentication" target="_blank">requests <code>AuthBase</code> instance</a> to be used for authentication instead of the <code>username</code> and <code>password</code>.
|
248
|
+
|
249
|
+
<h3>cert</h3>
|
250
|
+
The SSL certificate to use with all requests.
|
251
|
+
If string: the path to ssl client cert file (<code>.pem</code>).
|
252
|
+
If tuple: the <code class="language-python">("cert", "key")</code> pair.
|
253
|
+
|
254
|
+
<h3>verify_tls</h3>
|
255
|
+
Whether or not to verify the TLS / SSL certificate of the server.
|
256
|
+
If boolean: whether or not to verify the server TLS certificate.
|
257
|
+
If string: path to a CA bundle to use for verification.
|
258
|
+
|
259
|
+
<h3>extra_headers</h3>
|
260
|
+
A dictionary with extra / custom headers that will be send with every request.
|
261
|
+
This parameter can be used to send headers that are not documented in the
|
262
|
+
openapi document or to provide an API-key.
|
263
|
+
|
264
|
+
<h3>cookies</h3>
|
265
|
+
A dictionary or
|
266
|
+
<a href="https://docs.python.org/3/library/http.cookiejar.html#http.cookiejar.CookieJar" target="_blank"><code>CookieJar</code> object</a>
|
267
|
+
to send with all requests.
|
268
|
+
|
269
|
+
<h3>proxies</h3>
|
270
|
+
A dictionary of <code>"protocol": "proxy url"</code> to use for all requests.</doc>
|
271
|
+
<shortdoc><h2>Base parameters</h2></shortdoc>
|
208
272
|
</init>
|
209
273
|
</inits>
|
210
274
|
<keywords>
|
211
|
-
<kw name="Assert Href To Resource Is Valid" lineno="
|
275
|
+
<kw name="Assert Href To Resource Is Valid" lineno="486">
|
212
276
|
<arguments repr="href: str, referenced_resource: dict[str, JSON]">
|
213
277
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="href: str">
|
214
278
|
<name>href</name>
|
@@ -222,10 +286,11 @@
|
|
222
286
|
</type>
|
223
287
|
</arg>
|
224
288
|
</arguments>
|
225
|
-
<doc
|
289
|
+
<doc>Attempt to GET the resource referenced by the <span class="name">href</span> and validate it's equal
|
290
|
+
to the provided <span class="name">referenced_resource</span> object / dictionary.</doc>
|
226
291
|
<shortdoc>Attempt to GET the resource referenced by the `href` and validate it's equal to the provided `referenced_resource` object / dictionary.</shortdoc>
|
227
292
|
</kw>
|
228
|
-
<kw name="Authorized Request" lineno="
|
293
|
+
<kw name="Authorized Request" lineno="406">
|
229
294
|
<arguments repr="url: str, method: str, params: dict[str, Any] | None = None, headers: dict[str, str] | None = None, json_data: JSON | None = None, data: Any | None = None, files: Any | None = None">
|
230
295
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
231
296
|
<name>url</name>
|
@@ -283,12 +348,18 @@
|
|
283
348
|
</arg>
|
284
349
|
</arguments>
|
285
350
|
<returntype name="Response"/>
|
286
|
-
<doc
|
287
|
-
|
288
|
-
<
|
351
|
+
<doc>Perform a request using the security token or authentication set in the library.
|
352
|
+
|
353
|
+
<span class="name">json_data</span>, <span class="name">data</span> and <span class="name">files</span> are passed to <span class="name">requests.request</span>s <span class="name">json</span>,
|
354
|
+
<span class="name">data</span> and <span class="name">files</span> parameters unaltered.
|
355
|
+
See the requests documentation for details:
|
356
|
+
https://requests.readthedocs.io/en/latest/api/#requests.request
|
357
|
+
|
358
|
+
> Note: provided username / password or auth objects take precedence over token
|
359
|
+
based security</doc>
|
289
360
|
<shortdoc>Perform a request using the security token or authentication set in the library.</shortdoc>
|
290
361
|
</kw>
|
291
|
-
<kw name="Ensure In Use" lineno="
|
362
|
+
<kw name="Ensure In Use" lineno="391">
|
292
363
|
<arguments repr="url: str, resource_relation: IdReference">
|
293
364
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
294
365
|
<name>url</name>
|
@@ -299,10 +370,11 @@
|
|
299
370
|
<type name="IdReference"/>
|
300
371
|
</arg>
|
301
372
|
</arguments>
|
302
|
-
<doc
|
373
|
+
<doc>Ensure that the (right-most) <span class="name">id</span> of the resource referenced by the <span class="name">url</span>
|
374
|
+
is used by the resource defined by the <span class="name">resource_relation</span>.</doc>
|
303
375
|
<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>
|
304
376
|
</kw>
|
305
|
-
<kw name="Get Ids From Url" lineno="
|
377
|
+
<kw name="Get Ids From Url" lineno="356">
|
306
378
|
<arguments repr="url: str">
|
307
379
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
308
380
|
<name>url</name>
|
@@ -312,10 +384,11 @@
|
|
312
384
|
<returntype name="list" typedoc="list">
|
313
385
|
<type name="str" typedoc="string"/>
|
314
386
|
</returntype>
|
315
|
-
<doc
|
387
|
+
<doc>Perform a GET request on the <span class="name">url</span> and return the list of resource
|
388
|
+
<span class="name">ids</span> from the response.</doc>
|
316
389
|
<shortdoc>Perform a GET request on the `url` and return the list of resource `ids` from the response.</shortdoc>
|
317
390
|
</kw>
|
318
|
-
<kw name="Get Invalid Body Data" lineno="
|
391
|
+
<kw name="Get Invalid Body Data" lineno="253">
|
319
392
|
<arguments repr="url: str, method: str, status_code: int, request_data: RequestData">
|
320
393
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
321
394
|
<name>url</name>
|
@@ -338,11 +411,14 @@
|
|
338
411
|
<type name="str" typedoc="string"/>
|
339
412
|
<type name="JSON"/>
|
340
413
|
</returntype>
|
341
|
-
<doc
|
342
|
-
<
|
414
|
+
<doc>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
|
415
|
+
the provided <span class="name">status_code</span> for the <span class="name">method</span> operation on the <span class="name">url</span>.
|
416
|
+
|
417
|
+
> Note: applicable UniquePropertyValueConstraint and IdReference Relations are
|
418
|
+
considered before changes to <span class="name">json_data</span> are made.</doc>
|
343
419
|
<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>
|
344
420
|
</kw>
|
345
|
-
<kw name="Get Invalidated Parameters" lineno="
|
421
|
+
<kw name="Get Invalidated Parameters" lineno="276">
|
346
422
|
<arguments repr="status_code: int, request_data: RequestData">
|
347
423
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="status_code: int">
|
348
424
|
<name>status_code</name>
|
@@ -363,10 +439,11 @@
|
|
363
439
|
<type name="JSON"/>
|
364
440
|
</type>
|
365
441
|
</returntype>
|
366
|
-
<doc
|
442
|
+
<doc>Returns a version of <span class="name">params, headers</span> as present on <span class="name">request_data</span> that has
|
443
|
+
been modified to cause the provided <span class="name">status_code</span>.</doc>
|
367
444
|
<shortdoc>Returns a version of `params, headers` as present on `request_data` that has been modified to cause the provided `status_code`.</shortdoc>
|
368
445
|
</kw>
|
369
|
-
<kw name="Get Invalidated Url" lineno="
|
446
|
+
<kw name="Get Invalidated Url" lineno="366">
|
370
447
|
<arguments repr="valid_url: str, path: str = , expected_status_code: int = 404">
|
371
448
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="valid_url: str">
|
372
449
|
<name>valid_url</name>
|
@@ -384,11 +461,15 @@
|
|
384
461
|
</arg>
|
385
462
|
</arguments>
|
386
463
|
<returntype name="str" typedoc="string"/>
|
387
|
-
<doc
|
388
|
-
|
464
|
+
<doc>Return an url with all the path parameters in the <span class="name">valid_url</span> replaced by a
|
465
|
+
random UUID if no PathPropertiesConstraint is mapped for the <span class="name">"get"</span> operation
|
466
|
+
on the mapped <a href="#type-Path" class="name">path</a> and <span class="name">expected_status_code</span>.
|
467
|
+
If a PathPropertiesConstraint is mapped, the <span class="name">invalid_value</span> is returned.
|
468
|
+
|
469
|
+
Raises: ValueError if the valid_url cannot be invalidated.</doc>
|
389
470
|
<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>
|
390
471
|
</kw>
|
391
|
-
<kw name="Get Json Data With Conflict" lineno="
|
472
|
+
<kw name="Get Json Data With Conflict" lineno="292">
|
392
473
|
<arguments repr="url: str, method: str, dto: Dto, conflict_status_code: int">
|
393
474
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
394
475
|
<name>url</name>
|
@@ -411,10 +492,12 @@
|
|
411
492
|
<type name="str" typedoc="string"/>
|
412
493
|
<type name="JSON"/>
|
413
494
|
</returntype>
|
414
|
-
<doc
|
495
|
+
<doc>Return <span class="name">json_data</span> based on the <span class="name">UniquePropertyValueConstraint</span> that must be
|
496
|
+
returned by the <span class="name">get_relations</span> implementation on the <span class="name">dto</span> for the given
|
497
|
+
<span class="name">conflict_status_code</span>.</doc>
|
415
498
|
<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>
|
416
499
|
</kw>
|
417
|
-
<kw name="Get Parameterized Path From Url" lineno="
|
500
|
+
<kw name="Get Parameterized Path From Url" lineno="342">
|
418
501
|
<arguments repr="url: str">
|
419
502
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
420
503
|
<name>url</name>
|
@@ -422,10 +505,10 @@
|
|
422
505
|
</arg>
|
423
506
|
</arguments>
|
424
507
|
<returntype name="str" typedoc="string"/>
|
425
|
-
<doc
|
508
|
+
<doc>Return the path as found in the <span class="name">paths</span> section based on the given <span class="name">url</span>.</doc>
|
426
509
|
<shortdoc>Return the path as found in the `paths` section based on the given `url`.</shortdoc>
|
427
510
|
</kw>
|
428
|
-
<kw name="Get Request Data" lineno="
|
511
|
+
<kw name="Get Request Data" lineno="242">
|
429
512
|
<arguments repr="path: str, method: str">
|
430
513
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
431
514
|
<name>path</name>
|
@@ -437,10 +520,10 @@
|
|
437
520
|
</arg>
|
438
521
|
</arguments>
|
439
522
|
<returntype name="RequestData"/>
|
440
|
-
<doc
|
523
|
+
<doc>Return an object with valid request data for body, headers and query params.</doc>
|
441
524
|
<shortdoc>Return an object with valid request data for body, headers and query params.</shortdoc>
|
442
525
|
</kw>
|
443
|
-
<kw name="Get Request Values" lineno="
|
526
|
+
<kw name="Get Request Values" lineno="201">
|
444
527
|
<arguments repr="path: str, method: str, overrides: Mapping[str, JSON] = {}">
|
445
528
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
446
529
|
<name>path</name>
|
@@ -460,10 +543,10 @@
|
|
460
543
|
</arg>
|
461
544
|
</arguments>
|
462
545
|
<returntype name="RequestValues"/>
|
463
|
-
<doc
|
546
|
+
<doc>Return an object with all (valid) request values needed to make a request.</doc>
|
464
547
|
<shortdoc>Return an object with all (valid) request values needed to make a request.</shortdoc>
|
465
548
|
</kw>
|
466
|
-
<kw name="Get Valid Id For Path" lineno="
|
549
|
+
<kw name="Get Valid Id For Path" lineno="330">
|
467
550
|
<arguments repr="path: str">
|
468
551
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
469
552
|
<name>path</name>
|
@@ -475,11 +558,13 @@
|
|
475
558
|
<type name="int" typedoc="integer"/>
|
476
559
|
<type name="float" typedoc="float"/>
|
477
560
|
</returntype>
|
478
|
-
<doc
|
479
|
-
|
561
|
+
<doc>Support keyword that returns the <span class="name">id</span> for an existing resource at <a href="#type-Path" class="name">path</a>.
|
562
|
+
|
563
|
+
To prevent resource conflicts with other test cases, a new resource is created
|
564
|
+
(by a POST operation) if possible.</doc>
|
480
565
|
<shortdoc>Support keyword that returns the `id` for an existing resource at `path`.</shortdoc>
|
481
566
|
</kw>
|
482
|
-
<kw name="Get Valid Url" lineno="
|
567
|
+
<kw name="Get Valid Url" lineno="311">
|
483
568
|
<arguments repr="path: str">
|
484
569
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
485
570
|
<name>path</name>
|
@@ -487,12 +572,17 @@
|
|
487
572
|
</arg>
|
488
573
|
</arguments>
|
489
574
|
<returntype name="str" typedoc="string"/>
|
490
|
-
<doc
|
491
|
-
|
492
|
-
|
575
|
+
<doc>This keyword returns a valid url for the given <a href="#type-Path" class="name">path</a>.
|
576
|
+
|
577
|
+
If the <a href="#type-Path" class="name">path</a> contains path parameters the Get Valid Id For Path
|
578
|
+
keyword will be executed to retrieve valid ids for the path parameters.
|
579
|
+
|
580
|
+
> Note: if valid ids cannot be retrieved within the scope of the API, the
|
581
|
+
<span class="name">PathPropertiesConstraint</span> Relation can be used. More information can be found
|
582
|
+
[https://marketsquare.github.io/robotframework-openapitools/advanced_use.html | here].</doc>
|
493
583
|
<shortdoc>This keyword returns a valid url for the given `path`.</shortdoc>
|
494
584
|
</kw>
|
495
|
-
<kw name="Perform Validated Request" lineno="
|
585
|
+
<kw name="Perform Validated Request" lineno="455">
|
496
586
|
<arguments repr="path: str, status_code: int, request_values: RequestValues, original_data: Mapping[str, JSON] = {}">
|
497
587
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
498
588
|
<name>path</name>
|
@@ -515,21 +605,25 @@
|
|
515
605
|
<default>{}</default>
|
516
606
|
</arg>
|
517
607
|
</arguments>
|
518
|
-
<doc
|
608
|
+
<doc>This keyword first calls the Authorized Request keyword, then the Validate
|
609
|
+
Response keyword and finally validates, for <span class="name">DELETE</span> operations, whether
|
610
|
+
the target resource was indeed deleted (OK response) or not (error responses).</doc>
|
519
611
|
<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>
|
520
612
|
</kw>
|
521
|
-
<kw name="Set Auth" lineno="
|
613
|
+
<kw name="Set Auth" lineno="179">
|
522
614
|
<arguments repr="auth: AuthBase">
|
523
615
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="auth: AuthBase">
|
524
616
|
<name>auth</name>
|
525
617
|
<type name="AuthBase"/>
|
526
618
|
</arg>
|
527
619
|
</arguments>
|
528
|
-
<doc
|
529
|
-
|
620
|
+
<doc>Set the <span class="name">auth</span> used for authentication after the library is imported.
|
621
|
+
|
622
|
+
After calling this keyword, subsequent requests
|
623
|
+
will use the provided <span class="name">auth</span> instance.</doc>
|
530
624
|
<shortdoc>Set the `auth` used for authentication after the library is imported.</shortdoc>
|
531
625
|
</kw>
|
532
|
-
<kw name="Set Basic Auth" lineno="
|
626
|
+
<kw name="Set Basic Auth" lineno="167">
|
533
627
|
<arguments repr="username: str, password: str">
|
534
628
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="username: str">
|
535
629
|
<name>username</name>
|
@@ -540,11 +634,14 @@
|
|
540
634
|
<type name="str" typedoc="string"/>
|
541
635
|
</arg>
|
542
636
|
</arguments>
|
543
|
-
<doc
|
544
|
-
|
637
|
+
<doc>Set the <span class="name">username</span> and <span class="name">password</span> used for basic
|
638
|
+
authentication after the library is imported.
|
639
|
+
|
640
|
+
After calling this keyword, subsequent requests
|
641
|
+
will use the provided credentials.</doc>
|
545
642
|
<shortdoc>Set the `username` and `password` used for basic authentication after the library is imported.</shortdoc>
|
546
643
|
</kw>
|
547
|
-
<kw name="Set Extra Headers" lineno="
|
644
|
+
<kw name="Set Extra Headers" lineno="189">
|
548
645
|
<arguments repr="extra_headers: dict[str, str]">
|
549
646
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="extra_headers: dict[str, str]">
|
550
647
|
<name>extra_headers</name>
|
@@ -554,34 +651,42 @@
|
|
554
651
|
</type>
|
555
652
|
</arg>
|
556
653
|
</arguments>
|
557
|
-
<doc
|
558
|
-
|
654
|
+
<doc>Set the <span class="name">extra_headers</span> used in requests after the library is imported.
|
655
|
+
|
656
|
+
After calling this keyword, subsequent requests
|
657
|
+
will use the provided <span class="name">extra_headers</span>.</doc>
|
559
658
|
<shortdoc>Set the `extra_headers` used in requests after the library is imported.</shortdoc>
|
560
659
|
</kw>
|
561
|
-
<kw name="Set Origin" lineno="
|
660
|
+
<kw name="Set Origin" lineno="144">
|
562
661
|
<arguments repr="origin: str">
|
563
662
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="origin: str">
|
564
663
|
<name>origin</name>
|
565
664
|
<type name="str" typedoc="string"/>
|
566
665
|
</arg>
|
567
666
|
</arguments>
|
568
|
-
<doc
|
569
|
-
|
570
|
-
|
667
|
+
<doc>Set the <span class="name">origin</span> after the library is imported.
|
668
|
+
|
669
|
+
This can be done during the <span class="name">Suite setup</span> when using DataDriver in situations
|
670
|
+
where the OpenAPI document is available on disk but the target host address is
|
671
|
+
not known before the test starts.
|
672
|
+
|
673
|
+
In combination with OpenApiLibCore, the <span class="name">origin</span> can be used at any point to
|
674
|
+
target another server that hosts an API that complies to the same OAS.</doc>
|
571
675
|
<shortdoc>Set the `origin` after the library is imported.</shortdoc>
|
572
676
|
</kw>
|
573
|
-
<kw name="Set Security Token" lineno="
|
677
|
+
<kw name="Set Security Token" lineno="158">
|
574
678
|
<arguments repr="security_token: str">
|
575
679
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="security_token: str">
|
576
680
|
<name>security_token</name>
|
577
681
|
<type name="str" typedoc="string"/>
|
578
682
|
</arg>
|
579
683
|
</arguments>
|
580
|
-
<doc
|
581
|
-
|
684
|
+
<doc>Set the <span class="name">security_token</span> after the library is imported.
|
685
|
+
|
686
|
+
After calling this keyword, subsequent requests will use the provided token.</doc>
|
582
687
|
<shortdoc>Set the `security_token` after the library is imported.</shortdoc>
|
583
688
|
</kw>
|
584
|
-
<kw name="Validate Response" lineno="
|
689
|
+
<kw name="Validate Response" lineno="501">
|
585
690
|
<arguments repr="path: str, response: Response, original_data: Mapping[str, JSON] = {}">
|
586
691
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
587
692
|
<name>path</name>
|
@@ -600,28 +705,28 @@
|
|
600
705
|
<default>{}</default>
|
601
706
|
</arg>
|
602
707
|
</arguments>
|
603
|
-
<doc
|
604
|
-
<
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
</ul></doc>
|
708
|
+
<doc>Validate the <span class="name">response</span> by performing the following validations:
|
709
|
+
- validate the <span class="name">response</span> against the openapi schema for the <a href="#type-Path" class="name">path</a>
|
710
|
+
- validate that the response does not contain extra properties
|
711
|
+
- validate that a href, if present, refers to the correct resource
|
712
|
+
- validate that the value for a property that is in the response is equal to
|
713
|
+
the property value that was send
|
714
|
+
- validate that no <span class="name">original_data</span> is preserved when performing a PUT operation
|
715
|
+
- validate that a PATCH operation only updates the provided properties</doc>
|
612
716
|
<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>
|
613
717
|
</kw>
|
614
|
-
<kw name="Validate Response Using Validator" lineno="
|
718
|
+
<kw name="Validate Response Using Validator" lineno="475">
|
615
719
|
<arguments repr="response: Response">
|
616
720
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="response: Response">
|
617
721
|
<name>response</name>
|
618
722
|
<type name="Response"/>
|
619
723
|
</arg>
|
620
724
|
</arguments>
|
621
|
-
<doc
|
725
|
+
<doc>Validate the <span class="name">response</span> against the OpenAPI Spec that is
|
726
|
+
loaded during library initialization.</doc>
|
622
727
|
<shortdoc>Validate the `response` against the OpenAPI Spec that is loaded during library initialization.</shortdoc>
|
623
728
|
</kw>
|
624
|
-
<kw name="Validate Send Response" lineno="
|
729
|
+
<kw name="Validate Send Response" lineno="531">
|
625
730
|
<arguments repr="response: Response, original_data: Mapping[str, JSON] = {}">
|
626
731
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="response: Response">
|
627
732
|
<name>response</name>
|
@@ -636,7 +741,10 @@
|
|
636
741
|
<default>{}</default>
|
637
742
|
</arg>
|
638
743
|
</arguments>
|
639
|
-
<doc
|
744
|
+
<doc>Validate that each property that was send that is in the response has the value
|
745
|
+
that was send.
|
746
|
+
In case a PATCH request, validate that only the properties that were patched
|
747
|
+
have changed and that other properties are still at their pre-patch values.</doc>
|
640
748
|
<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>
|
641
749
|
</kw>
|
642
750
|
</keywords>
|
@@ -793,7 +901,7 @@
|
|
793
901
|
</usages>
|
794
902
|
</type>
|
795
903
|
<type name="ValidationLevel" type="Enum">
|
796
|
-
<doc
|
904
|
+
<doc>The available levels for the response_validation parameter.</doc>
|
797
905
|
<accepts>
|
798
906
|
<type>string</type>
|
799
907
|
</accepts>
|