robotframework-openapitools 0.3.0__py3-none-any.whl → 1.0.0__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 +45 -41
- OpenApiDriver/openapi_executors.py +83 -49
- OpenApiDriver/openapi_reader.py +114 -116
- OpenApiDriver/openapidriver.libspec +209 -133
- OpenApiDriver/openapidriver.py +31 -296
- OpenApiLibCore/__init__.py +39 -13
- OpenApiLibCore/annotations.py +10 -0
- OpenApiLibCore/data_generation/__init__.py +10 -0
- OpenApiLibCore/data_generation/body_data_generation.py +250 -0
- OpenApiLibCore/data_generation/data_generation_core.py +233 -0
- OpenApiLibCore/data_invalidation.py +294 -0
- OpenApiLibCore/dto_base.py +75 -129
- OpenApiLibCore/dto_utils.py +125 -85
- OpenApiLibCore/localized_faker.py +88 -0
- OpenApiLibCore/models.py +723 -0
- OpenApiLibCore/oas_cache.py +14 -13
- OpenApiLibCore/openapi_libcore.libspec +363 -322
- OpenApiLibCore/openapi_libcore.py +388 -1903
- OpenApiLibCore/parameter_utils.py +97 -0
- OpenApiLibCore/path_functions.py +215 -0
- OpenApiLibCore/path_invalidation.py +42 -0
- OpenApiLibCore/protocols.py +38 -0
- OpenApiLibCore/request_data.py +246 -0
- OpenApiLibCore/resource_relations.py +55 -0
- OpenApiLibCore/validation.py +380 -0
- OpenApiLibCore/value_utils.py +216 -481
- openapi_libgen/__init__.py +3 -0
- openapi_libgen/command_line.py +75 -0
- openapi_libgen/generator.py +82 -0
- openapi_libgen/parsing_utils.py +30 -0
- openapi_libgen/spec_parser.py +154 -0
- openapi_libgen/templates/__init__.jinja +3 -0
- openapi_libgen/templates/library.jinja +30 -0
- robotframework_openapitools-1.0.0.dist-info/METADATA +249 -0
- robotframework_openapitools-1.0.0.dist-info/RECORD +40 -0
- {robotframework_openapitools-0.3.0.dist-info → robotframework_openapitools-1.0.0.dist-info}/WHEEL +1 -1
- robotframework_openapitools-1.0.0.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.0.dist-info}/LICENSE +0 -0
@@ -1,13 +1,14 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<keywordspec name="OpenApiLibCore" type="LIBRARY" format="HTML" scope="SUITE" generated="
|
3
|
-
<version>0.
|
4
|
-
<doc
|
5
|
-
|
2
|
+
<keywordspec name="OpenApiLibCore" type="LIBRARY" format="HTML" scope="SUITE" generated="2025-09-11T15:33:25+00:00" specversion="6" source="/workspaces/robotframework-openapitools/src/OpenApiLibCore/openapi_libcore.py" lineno="59">
|
3
|
+
<version>1.0.0</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
|
-
<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 |
|
10
|
+
<init name="__init__" lineno="60">
|
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>
|
13
14
|
<type name="str" typedoc="string"/>
|
@@ -50,16 +51,15 @@
|
|
50
51
|
<type name="str" typedoc="string"/>
|
51
52
|
<default>id</default>
|
52
53
|
</arg>
|
53
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="faker_locale: str |
|
54
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="faker_locale: str | list[str] = ">
|
54
55
|
<name>faker_locale</name>
|
55
56
|
<type name="Union" union="true">
|
56
57
|
<type name="str" typedoc="string"/>
|
57
|
-
<type name="
|
58
|
+
<type name="list" typedoc="list">
|
58
59
|
<type name="str" typedoc="string"/>
|
59
60
|
</type>
|
60
|
-
<type name="None" typedoc="None"/>
|
61
61
|
</type>
|
62
|
-
<default
|
62
|
+
<default/>
|
63
63
|
</arg>
|
64
64
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="require_body_for_invalid_url: bool = False">
|
65
65
|
<name>require_body_for_invalid_url</name>
|
@@ -71,9 +71,9 @@
|
|
71
71
|
<type name="int" typedoc="integer"/>
|
72
72
|
<default>1</default>
|
73
73
|
</arg>
|
74
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="recursion_default:
|
74
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="recursion_default: JSON = {}">
|
75
75
|
<name>recursion_default</name>
|
76
|
-
<type name="
|
76
|
+
<type name="JSON"/>
|
77
77
|
<default>{}</default>
|
78
78
|
</arg>
|
79
79
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="username: str = ">
|
@@ -99,42 +99,37 @@
|
|
99
99
|
</type>
|
100
100
|
<default>None</default>
|
101
101
|
</arg>
|
102
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="cert: str |
|
102
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="cert: str | tuple[str, str] = ">
|
103
103
|
<name>cert</name>
|
104
104
|
<type name="Union" union="true">
|
105
105
|
<type name="str" typedoc="string"/>
|
106
|
-
<type name="
|
106
|
+
<type name="tuple" typedoc="tuple">
|
107
107
|
<type name="str" typedoc="string"/>
|
108
108
|
<type name="str" typedoc="string"/>
|
109
109
|
</type>
|
110
|
-
<type name="None" typedoc="None"/>
|
111
110
|
</type>
|
112
|
-
<default
|
111
|
+
<default/>
|
113
112
|
</arg>
|
114
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="verify_tls: bool | str
|
113
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="verify_tls: bool | str = True">
|
115
114
|
<name>verify_tls</name>
|
116
115
|
<type name="Union" union="true">
|
117
116
|
<type name="bool" typedoc="boolean"/>
|
118
117
|
<type name="str" typedoc="string"/>
|
119
|
-
<type name="None" typedoc="None"/>
|
120
118
|
</type>
|
121
119
|
<default>True</default>
|
122
120
|
</arg>
|
123
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="extra_headers:
|
121
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="extra_headers: Mapping[str, str] = {}">
|
124
122
|
<name>extra_headers</name>
|
125
|
-
<type name="
|
126
|
-
<type name="Dict" typedoc="dictionary">
|
123
|
+
<type name="Mapping" typedoc="dictionary">
|
127
124
|
<type name="str" typedoc="string"/>
|
128
125
|
<type name="str" typedoc="string"/>
|
129
126
|
</type>
|
130
|
-
<
|
131
|
-
</type>
|
132
|
-
<default>None</default>
|
127
|
+
<default>{}</default>
|
133
128
|
</arg>
|
134
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="cookies:
|
129
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="cookies: MutableMapping[str, str] | RequestsCookieJar | None = None">
|
135
130
|
<name>cookies</name>
|
136
131
|
<type name="Union" union="true">
|
137
|
-
<type name="
|
132
|
+
<type name="MutableMapping" typedoc="dictionary">
|
138
133
|
<type name="str" typedoc="string"/>
|
139
134
|
<type name="str" typedoc="string"/>
|
140
135
|
</type>
|
@@ -143,10 +138,10 @@
|
|
143
138
|
</type>
|
144
139
|
<default>None</default>
|
145
140
|
</arg>
|
146
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="proxies:
|
141
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="proxies: MutableMapping[str, str] | None = None">
|
147
142
|
<name>proxies</name>
|
148
143
|
<type name="Union" union="true">
|
149
|
-
<type name="
|
144
|
+
<type name="MutableMapping" typedoc="dictionary">
|
150
145
|
<type name="str" typedoc="string"/>
|
151
146
|
<type name="str" typedoc="string"/>
|
152
147
|
</type>
|
@@ -155,67 +150,148 @@
|
|
155
150
|
<default>None</default>
|
156
151
|
</arg>
|
157
152
|
</arguments>
|
158
|
-
<doc><
|
159
|
-
|
160
|
-
<
|
161
|
-
|
162
|
-
|
163
|
-
<
|
164
|
-
|
165
|
-
|
166
|
-
<
|
167
|
-
|
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:
|
168
172
|
<ul>
|
169
173
|
<li><code>DISABLED</code>: All Response validation errors will be ignored</li>
|
170
174
|
<li><code>INFO</code>: Any Response validation erros will be logged at <code>INFO</code> level</li>
|
171
175
|
<li><code>WARN</code>: Any Response validation erros will be logged at <code>WARN</code> level</li>
|
172
176
|
<li><code>STRICT</code>: The Test Case will fail on any Response validation errors</li>
|
173
177
|
</ul>
|
174
|
-
|
175
|
-
<
|
176
|
-
<
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
<
|
181
|
-
|
182
|
-
|
183
|
-
<
|
184
|
-
|
185
|
-
<
|
186
|
-
|
187
|
-
|
188
|
-
<h3>
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
<
|
195
|
-
|
196
|
-
|
197
|
-
<
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
<
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
<
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
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>
|
214
272
|
</init>
|
215
273
|
</inits>
|
216
274
|
<keywords>
|
217
|
-
<kw name="
|
218
|
-
<arguments repr="
|
275
|
+
<kw name="Assert Href To Resource Is Valid" lineno="486">
|
276
|
+
<arguments repr="href: str, referenced_resource: dict[str, JSON]">
|
277
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="href: str">
|
278
|
+
<name>href</name>
|
279
|
+
<type name="str" typedoc="string"/>
|
280
|
+
</arg>
|
281
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="referenced_resource: dict[str, JSON]">
|
282
|
+
<name>referenced_resource</name>
|
283
|
+
<type name="dict" typedoc="dictionary">
|
284
|
+
<type name="str" typedoc="string"/>
|
285
|
+
<type name="JSON"/>
|
286
|
+
</type>
|
287
|
+
</arg>
|
288
|
+
</arguments>
|
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>
|
291
|
+
<shortdoc>Attempt to GET the resource referenced by the `href` and validate it's equal to the provided `referenced_resource` object / dictionary.</shortdoc>
|
292
|
+
</kw>
|
293
|
+
<kw name="Authorized Request" lineno="406">
|
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">
|
219
295
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
220
296
|
<name>url</name>
|
221
297
|
<type name="str" typedoc="string"/>
|
@@ -224,10 +300,10 @@
|
|
224
300
|
<name>method</name>
|
225
301
|
<type name="str" typedoc="string"/>
|
226
302
|
</arg>
|
227
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="params:
|
303
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="params: dict[str, Any] | None = None">
|
228
304
|
<name>params</name>
|
229
305
|
<type name="Union" union="true">
|
230
|
-
<type name="
|
306
|
+
<type name="dict" typedoc="dictionary">
|
231
307
|
<type name="str" typedoc="string"/>
|
232
308
|
<type name="Any" typedoc="Any"/>
|
233
309
|
</type>
|
@@ -235,10 +311,10 @@
|
|
235
311
|
</type>
|
236
312
|
<default>None</default>
|
237
313
|
</arg>
|
238
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="headers:
|
314
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="headers: dict[str, str] | None = None">
|
239
315
|
<name>headers</name>
|
240
316
|
<type name="Union" union="true">
|
241
|
-
<type name="
|
317
|
+
<type name="dict" typedoc="dictionary">
|
242
318
|
<type name="str" typedoc="string"/>
|
243
319
|
<type name="str" typedoc="string"/>
|
244
320
|
</type>
|
@@ -246,68 +322,44 @@
|
|
246
322
|
</type>
|
247
323
|
<default>None</default>
|
248
324
|
</arg>
|
249
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="json_data:
|
325
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="json_data: JSON | None = None">
|
250
326
|
<name>json_data</name>
|
251
327
|
<type name="Union" union="true">
|
252
|
-
<type name="Dict" typedoc="dictionary">
|
253
|
-
<type name="str" typedoc="string"/>
|
254
|
-
<type name="Union" union="true">
|
255
|
-
<type name="Dict" typedoc="dictionary">
|
256
|
-
<type name="str" typedoc="string"/>
|
257
|
-
<type name="JSON"/>
|
258
|
-
</type>
|
259
|
-
<type name="List" typedoc="list">
|
260
328
|
<type name="JSON"/>
|
261
|
-
</type>
|
262
|
-
<type name="str" typedoc="string"/>
|
263
|
-
<type name="int" typedoc="integer"/>
|
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"/>
|
286
|
-
<type name="int" typedoc="integer"/>
|
287
|
-
<type name="float" typedoc="float"/>
|
288
|
-
<type name="bool" typedoc="boolean"/>
|
289
329
|
<type name="None" typedoc="None"/>
|
290
330
|
</type>
|
291
331
|
<default>None</default>
|
292
332
|
</arg>
|
293
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="data: Any = None">
|
333
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="data: Any | None = None">
|
294
334
|
<name>data</name>
|
335
|
+
<type name="Union" union="true">
|
295
336
|
<type name="Any" typedoc="Any"/>
|
337
|
+
<type name="None" typedoc="None"/>
|
338
|
+
</type>
|
296
339
|
<default>None</default>
|
297
340
|
</arg>
|
298
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="files: Any = None">
|
341
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="files: Any | None = None">
|
299
342
|
<name>files</name>
|
343
|
+
<type name="Union" union="true">
|
300
344
|
<type name="Any" typedoc="Any"/>
|
345
|
+
<type name="None" typedoc="None"/>
|
346
|
+
</type>
|
301
347
|
<default>None</default>
|
302
348
|
</arg>
|
303
349
|
</arguments>
|
304
350
|
<returntype name="Response"/>
|
305
|
-
<doc
|
306
|
-
|
307
|
-
<
|
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>
|
308
360
|
<shortdoc>Perform a request using the security token or authentication set in the library.</shortdoc>
|
309
361
|
</kw>
|
310
|
-
<kw name="Ensure In Use" lineno="
|
362
|
+
<kw name="Ensure In Use" lineno="391">
|
311
363
|
<arguments repr="url: str, resource_relation: IdReference">
|
312
364
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
313
365
|
<name>url</name>
|
@@ -318,23 +370,25 @@
|
|
318
370
|
<type name="IdReference"/>
|
319
371
|
</arg>
|
320
372
|
</arguments>
|
321
|
-
<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>
|
322
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>
|
323
376
|
</kw>
|
324
|
-
<kw name="Get Ids From Url" lineno="
|
377
|
+
<kw name="Get Ids From Url" lineno="356">
|
325
378
|
<arguments repr="url: str">
|
326
379
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
327
380
|
<name>url</name>
|
328
381
|
<type name="str" typedoc="string"/>
|
329
382
|
</arg>
|
330
383
|
</arguments>
|
331
|
-
<returntype name="
|
384
|
+
<returntype name="list" typedoc="list">
|
332
385
|
<type name="str" typedoc="string"/>
|
333
386
|
</returntype>
|
334
|
-
<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>
|
335
389
|
<shortdoc>Perform a GET request on the `url` and return the list of resource `ids` from the response.</shortdoc>
|
336
390
|
</kw>
|
337
|
-
<kw name="Get Invalid
|
391
|
+
<kw name="Get Invalid Body Data" lineno="253">
|
338
392
|
<arguments repr="url: str, method: str, status_code: int, request_data: RequestData">
|
339
393
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
340
394
|
<name>url</name>
|
@@ -353,15 +407,18 @@
|
|
353
407
|
<type name="RequestData"/>
|
354
408
|
</arg>
|
355
409
|
</arguments>
|
356
|
-
<returntype name="
|
410
|
+
<returntype name="dict" typedoc="dictionary">
|
357
411
|
<type name="str" typedoc="string"/>
|
358
|
-
<type name="
|
412
|
+
<type name="JSON"/>
|
359
413
|
</returntype>
|
360
|
-
<doc
|
361
|
-
<
|
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>
|
362
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>
|
363
420
|
</kw>
|
364
|
-
<kw name="Get Invalidated Parameters" lineno="
|
421
|
+
<kw name="Get Invalidated Parameters" lineno="276">
|
365
422
|
<arguments repr="status_code: int, request_data: RequestData">
|
366
423
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="status_code: int">
|
367
424
|
<name>status_code</name>
|
@@ -372,69 +429,47 @@
|
|
372
429
|
<type name="RequestData"/>
|
373
430
|
</arg>
|
374
431
|
</arguments>
|
375
|
-
<returntype name="
|
376
|
-
<type name="
|
432
|
+
<returntype name="tuple" typedoc="tuple">
|
433
|
+
<type name="dict" typedoc="dictionary">
|
377
434
|
<type name="str" typedoc="string"/>
|
378
|
-
<type name="
|
435
|
+
<type name="JSON"/>
|
379
436
|
</type>
|
380
|
-
<type name="
|
381
|
-
<type name="str" typedoc="string"/>
|
437
|
+
<type name="dict" typedoc="dictionary">
|
382
438
|
<type name="str" typedoc="string"/>
|
439
|
+
<type name="JSON"/>
|
383
440
|
</type>
|
384
441
|
</returntype>
|
385
|
-
<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>
|
386
444
|
<shortdoc>Returns a version of `params, headers` as present on `request_data` that has been modified to cause the provided `status_code`.</shortdoc>
|
387
445
|
</kw>
|
388
|
-
<kw name="Get Invalidated Url" lineno="
|
389
|
-
<arguments repr="valid_url: str">
|
446
|
+
<kw name="Get Invalidated Url" lineno="366">
|
447
|
+
<arguments repr="valid_url: str, path: str = , expected_status_code: int = 404">
|
390
448
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="valid_url: str">
|
391
449
|
<name>valid_url</name>
|
392
450
|
<type name="str" typedoc="string"/>
|
393
451
|
</arg>
|
394
|
-
|
395
|
-
<
|
396
|
-
<type name="str" typedoc="string"/>
|
397
|
-
<type name="None" typedoc="None"/>
|
398
|
-
</returntype>
|
399
|
-
<doc><p>Return an url with all the path parameters in the <span class="name">valid_url</span> replaced by a random UUID.</p>
|
400
|
-
<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>
|
402
|
-
</kw>
|
403
|
-
<kw name="Get Json Data For Dto Class" lineno="1206">
|
404
|
-
<arguments repr="schema: Dict[str, Any], dto_class: Dto | Type[Dto], operation_id: str = ">
|
405
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="schema: Dict[str, Any]">
|
406
|
-
<name>schema</name>
|
407
|
-
<type name="Dict" typedoc="dictionary">
|
408
|
-
<type name="str" typedoc="string"/>
|
409
|
-
<type name="Any" typedoc="Any"/>
|
410
|
-
</type>
|
411
|
-
</arg>
|
412
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="dto_class: Dto | Type[Dto]">
|
413
|
-
<name>dto_class</name>
|
414
|
-
<type name="Union" union="true">
|
415
|
-
<type name="Dto"/>
|
416
|
-
<type name="Type">
|
417
|
-
<type name="Dto"/>
|
418
|
-
</type>
|
419
|
-
</type>
|
420
|
-
</arg>
|
421
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="operation_id: str = ">
|
422
|
-
<name>operation_id</name>
|
452
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="path: str = ">
|
453
|
+
<name>path</name>
|
423
454
|
<type name="str" typedoc="string"/>
|
424
455
|
<default/>
|
425
456
|
</arg>
|
457
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="expected_status_code: int = 404">
|
458
|
+
<name>expected_status_code</name>
|
459
|
+
<type name="int" typedoc="integer"/>
|
460
|
+
<default>404</default>
|
461
|
+
</arg>
|
426
462
|
</arguments>
|
427
|
-
<returntype name="
|
428
|
-
<
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
<
|
435
|
-
<shortdoc>Generate a valid (json-compatible) dict for all the `dto_class` properties.</shortdoc>
|
463
|
+
<returntype name="str" typedoc="string"/>
|
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>
|
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>
|
436
471
|
</kw>
|
437
|
-
<kw name="Get Json Data With Conflict" lineno="
|
472
|
+
<kw name="Get Json Data With Conflict" lineno="292">
|
438
473
|
<arguments repr="url: str, method: str, dto: Dto, conflict_status_code: int">
|
439
474
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
440
475
|
<name>url</name>
|
@@ -453,14 +488,16 @@
|
|
453
488
|
<type name="int" typedoc="integer"/>
|
454
489
|
</arg>
|
455
490
|
</arguments>
|
456
|
-
<returntype name="
|
491
|
+
<returntype name="dict" typedoc="dictionary">
|
457
492
|
<type name="str" typedoc="string"/>
|
458
|
-
<type name="
|
493
|
+
<type name="JSON"/>
|
459
494
|
</returntype>
|
460
|
-
<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>
|
461
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>
|
462
499
|
</kw>
|
463
|
-
<kw name="Get Parameterized
|
500
|
+
<kw name="Get Parameterized Path From Url" lineno="342">
|
464
501
|
<arguments repr="url: str">
|
465
502
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
466
503
|
<name>url</name>
|
@@ -468,13 +505,13 @@
|
|
468
505
|
</arg>
|
469
506
|
</arguments>
|
470
507
|
<returntype name="str" typedoc="string"/>
|
471
|
-
<doc
|
472
|
-
<shortdoc>Return the
|
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>
|
509
|
+
<shortdoc>Return the path as found in the `paths` section based on the given `url`.</shortdoc>
|
473
510
|
</kw>
|
474
|
-
<kw name="Get Request Data" lineno="
|
475
|
-
<arguments repr="
|
476
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="
|
477
|
-
<name>
|
511
|
+
<kw name="Get Request Data" lineno="242">
|
512
|
+
<arguments repr="path: str, method: str">
|
513
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
514
|
+
<name>path</name>
|
478
515
|
<type name="str" typedoc="string"/>
|
479
516
|
</arg>
|
480
517
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="method: str">
|
@@ -483,48 +520,70 @@
|
|
483
520
|
</arg>
|
484
521
|
</arguments>
|
485
522
|
<returntype name="RequestData"/>
|
486
|
-
<doc
|
523
|
+
<doc>Return an object with valid request data for body, headers and query params.</doc>
|
487
524
|
<shortdoc>Return an object with valid request data for body, headers and query params.</shortdoc>
|
488
525
|
</kw>
|
489
|
-
<kw name="Get
|
490
|
-
<arguments repr="
|
491
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="
|
492
|
-
<name>
|
526
|
+
<kw name="Get Request Values" lineno="201">
|
527
|
+
<arguments repr="path: str, method: str, overrides: Mapping[str, JSON] = {}">
|
528
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
529
|
+
<name>path</name>
|
493
530
|
<type name="str" typedoc="string"/>
|
494
531
|
</arg>
|
495
532
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="method: str">
|
496
533
|
<name>method</name>
|
497
534
|
<type name="str" typedoc="string"/>
|
498
535
|
</arg>
|
536
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="overrides: Mapping[str, JSON] = {}">
|
537
|
+
<name>overrides</name>
|
538
|
+
<type name="Mapping" typedoc="dictionary">
|
539
|
+
<type name="str" typedoc="string"/>
|
540
|
+
<type name="JSON"/>
|
541
|
+
</type>
|
542
|
+
<default>{}</default>
|
543
|
+
</arg>
|
544
|
+
</arguments>
|
545
|
+
<returntype name="RequestValues"/>
|
546
|
+
<doc>Return an object with all (valid) request values needed to make a request.</doc>
|
547
|
+
<shortdoc>Return an object with all (valid) request values needed to make a request.</shortdoc>
|
548
|
+
</kw>
|
549
|
+
<kw name="Get Valid Id For Path" lineno="330">
|
550
|
+
<arguments repr="path: str">
|
551
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
552
|
+
<name>path</name>
|
553
|
+
<type name="str" typedoc="string"/>
|
554
|
+
</arg>
|
499
555
|
</arguments>
|
500
556
|
<returntype name="Union" union="true">
|
501
557
|
<type name="str" typedoc="string"/>
|
502
558
|
<type name="int" typedoc="integer"/>
|
503
559
|
<type name="float" typedoc="float"/>
|
504
560
|
</returntype>
|
505
|
-
<doc
|
506
|
-
|
507
|
-
|
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>
|
565
|
+
<shortdoc>Support keyword that returns the `id` for an existing resource at `path`.</shortdoc>
|
508
566
|
</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>
|
567
|
+
<kw name="Get Valid Url" lineno="311">
|
568
|
+
<arguments repr="path: str">
|
569
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
570
|
+
<name>path</name>
|
517
571
|
<type name="str" typedoc="string"/>
|
518
572
|
</arg>
|
519
573
|
</arguments>
|
520
574
|
<returntype name="str" typedoc="string"/>
|
521
|
-
<doc
|
522
|
-
|
523
|
-
|
524
|
-
|
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>
|
583
|
+
<shortdoc>This keyword returns a valid url for the given `path`.</shortdoc>
|
525
584
|
</kw>
|
526
|
-
<kw name="Perform Validated Request" lineno="
|
527
|
-
<arguments repr="path: str, status_code: int, request_values: RequestValues, original_data:
|
585
|
+
<kw name="Perform Validated Request" lineno="455">
|
586
|
+
<arguments repr="path: str, status_code: int, request_values: RequestValues, original_data: Mapping[str, JSON] = {}">
|
528
587
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
529
588
|
<name>path</name>
|
530
589
|
<type name="str" typedoc="string"/>
|
@@ -537,33 +596,34 @@
|
|
537
596
|
<name>request_values</name>
|
538
597
|
<type name="RequestValues"/>
|
539
598
|
</arg>
|
540
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data:
|
599
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data: Mapping[str, JSON] = {}">
|
541
600
|
<name>original_data</name>
|
542
|
-
<type name="
|
543
|
-
<type name="Dict" typedoc="dictionary">
|
601
|
+
<type name="Mapping" typedoc="dictionary">
|
544
602
|
<type name="str" typedoc="string"/>
|
545
|
-
<type name="
|
546
|
-
</type>
|
547
|
-
<type name="None" typedoc="None"/>
|
603
|
+
<type name="JSON"/>
|
548
604
|
</type>
|
549
|
-
<default>
|
605
|
+
<default>{}</default>
|
550
606
|
</arg>
|
551
607
|
</arguments>
|
552
|
-
<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>
|
553
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>
|
554
612
|
</kw>
|
555
|
-
<kw name="Set Auth" lineno="
|
613
|
+
<kw name="Set Auth" lineno="179">
|
556
614
|
<arguments repr="auth: AuthBase">
|
557
615
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="auth: AuthBase">
|
558
616
|
<name>auth</name>
|
559
617
|
<type name="AuthBase"/>
|
560
618
|
</arg>
|
561
619
|
</arguments>
|
562
|
-
<doc
|
563
|
-
|
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>
|
564
624
|
<shortdoc>Set the `auth` used for authentication after the library is imported.</shortdoc>
|
565
625
|
</kw>
|
566
|
-
<kw name="Set Basic Auth" lineno="
|
626
|
+
<kw name="Set Basic Auth" lineno="167">
|
567
627
|
<arguments repr="username: str, password: str">
|
568
628
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="username: str">
|
569
629
|
<name>username</name>
|
@@ -574,69 +634,60 @@
|
|
574
634
|
<type name="str" typedoc="string"/>
|
575
635
|
</arg>
|
576
636
|
</arguments>
|
577
|
-
<doc
|
578
|
-
|
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>
|
579
642
|
<shortdoc>Set the `username` and `password` used for basic authentication after the library is imported.</shortdoc>
|
580
643
|
</kw>
|
581
|
-
<kw name="Set Extra Headers" lineno="
|
582
|
-
<arguments repr="extra_headers:
|
583
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="extra_headers:
|
644
|
+
<kw name="Set Extra Headers" lineno="189">
|
645
|
+
<arguments repr="extra_headers: dict[str, str]">
|
646
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="extra_headers: dict[str, str]">
|
584
647
|
<name>extra_headers</name>
|
585
|
-
<type name="
|
648
|
+
<type name="dict" typedoc="dictionary">
|
586
649
|
<type name="str" typedoc="string"/>
|
587
650
|
<type name="str" typedoc="string"/>
|
588
651
|
</type>
|
589
652
|
</arg>
|
590
653
|
</arguments>
|
591
|
-
<doc
|
592
|
-
|
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>
|
593
658
|
<shortdoc>Set the `extra_headers` used in requests after the library is imported.</shortdoc>
|
594
659
|
</kw>
|
595
|
-
<kw name="Set Origin" lineno="
|
660
|
+
<kw name="Set Origin" lineno="144">
|
596
661
|
<arguments repr="origin: str">
|
597
662
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="origin: str">
|
598
663
|
<name>origin</name>
|
599
664
|
<type name="str" typedoc="string"/>
|
600
665
|
</arg>
|
601
666
|
</arguments>
|
602
|
-
<doc
|
603
|
-
|
604
|
-
|
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>
|
605
675
|
<shortdoc>Set the `origin` after the library is imported.</shortdoc>
|
606
676
|
</kw>
|
607
|
-
<kw name="Set Security Token" lineno="
|
677
|
+
<kw name="Set Security Token" lineno="158">
|
608
678
|
<arguments repr="security_token: str">
|
609
679
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="security_token: str">
|
610
680
|
<name>security_token</name>
|
611
681
|
<type name="str" typedoc="string"/>
|
612
682
|
</arg>
|
613
683
|
</arguments>
|
614
|
-
<doc
|
615
|
-
|
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>
|
616
687
|
<shortdoc>Set the `security_token` after the library is imported.</shortdoc>
|
617
688
|
</kw>
|
618
|
-
<kw name="Validate
|
619
|
-
<arguments repr="
|
620
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="resource: Dict[str, Any]">
|
621
|
-
<name>resource</name>
|
622
|
-
<type name="Dict" typedoc="dictionary">
|
623
|
-
<type name="str" typedoc="string"/>
|
624
|
-
<type name="Any" typedoc="Any"/>
|
625
|
-
</type>
|
626
|
-
</arg>
|
627
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="schema: Dict[str, Any]">
|
628
|
-
<name>schema</name>
|
629
|
-
<type name="Dict" typedoc="dictionary">
|
630
|
-
<type name="str" typedoc="string"/>
|
631
|
-
<type name="Any" typedoc="Any"/>
|
632
|
-
</type>
|
633
|
-
</arg>
|
634
|
-
</arguments>
|
635
|
-
<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
|
-
<shortdoc>Validate that the `resource` does not contain any properties that are not defined in the `schema_properties`.</shortdoc>
|
637
|
-
</kw>
|
638
|
-
<kw name="Validate Response" lineno="1804">
|
639
|
-
<arguments repr="path: str, response: Response, original_data: Dict[str, Any] | None = None">
|
689
|
+
<kw name="Validate Response" lineno="501">
|
690
|
+
<arguments repr="path: str, response: Response, original_data: Mapping[str, JSON] = {}">
|
640
691
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
641
692
|
<name>path</name>
|
642
693
|
<type name="str" typedoc="string"/>
|
@@ -645,48 +696,55 @@
|
|
645
696
|
<name>response</name>
|
646
697
|
<type name="Response"/>
|
647
698
|
</arg>
|
648
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data:
|
699
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data: Mapping[str, JSON] = {}">
|
649
700
|
<name>original_data</name>
|
650
|
-
<type name="
|
651
|
-
<type name="Dict" typedoc="dictionary">
|
701
|
+
<type name="Mapping" typedoc="dictionary">
|
652
702
|
<type name="str" typedoc="string"/>
|
653
|
-
<type name="
|
654
|
-
</type>
|
655
|
-
<type name="None" typedoc="None"/>
|
703
|
+
<type name="JSON"/>
|
656
704
|
</type>
|
657
|
-
<default>
|
705
|
+
<default>{}</default>
|
658
706
|
</arg>
|
659
707
|
</arguments>
|
660
|
-
<doc
|
661
|
-
<
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
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>
|
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>
|
717
|
+
</kw>
|
718
|
+
<kw name="Validate Response Using Validator" lineno="475">
|
719
|
+
<arguments repr="response: Response">
|
720
|
+
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="response: Response">
|
721
|
+
<name>response</name>
|
722
|
+
<type name="Response"/>
|
723
|
+
</arg>
|
724
|
+
</arguments>
|
725
|
+
<doc>Validate the <span class="name">response</span> against the OpenAPI Spec that is
|
726
|
+
loaded during library initialization.</doc>
|
727
|
+
<shortdoc>Validate the `response` against the OpenAPI Spec that is loaded during library initialization.</shortdoc>
|
670
728
|
</kw>
|
671
|
-
<kw name="Validate Send Response" lineno="
|
672
|
-
<arguments repr="response: Response, original_data:
|
729
|
+
<kw name="Validate Send Response" lineno="531">
|
730
|
+
<arguments repr="response: Response, original_data: Mapping[str, JSON] = {}">
|
673
731
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="response: Response">
|
674
732
|
<name>response</name>
|
675
733
|
<type name="Response"/>
|
676
734
|
</arg>
|
677
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data:
|
735
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data: Mapping[str, JSON] = {}">
|
678
736
|
<name>original_data</name>
|
679
|
-
<type name="
|
680
|
-
<type name="Dict" typedoc="dictionary">
|
737
|
+
<type name="Mapping" typedoc="dictionary">
|
681
738
|
<type name="str" typedoc="string"/>
|
682
|
-
<type name="
|
683
|
-
</type>
|
684
|
-
<type name="None" typedoc="None"/>
|
739
|
+
<type name="JSON"/>
|
685
740
|
</type>
|
686
|
-
<default>
|
741
|
+
<default>{}</default>
|
687
742
|
</arg>
|
688
743
|
</arguments>
|
689
|
-
<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>
|
690
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>
|
691
749
|
</kw>
|
692
750
|
</keywords>
|
@@ -697,16 +755,7 @@
|
|
697
755
|
<type>Any</type>
|
698
756
|
</accepts>
|
699
757
|
<usages>
|
700
|
-
<usage>__init__</usage>
|
701
758
|
<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
759
|
</usages>
|
711
760
|
</type>
|
712
761
|
<type name="boolean" type="Standard">
|
@@ -720,7 +769,6 @@
|
|
720
769
|
</accepts>
|
721
770
|
<usages>
|
722
771
|
<usage>__init__</usage>
|
723
|
-
<usage>Authorized Request</usage>
|
724
772
|
</usages>
|
725
773
|
</type>
|
726
774
|
<type name="dictionary" type="Standard">
|
@@ -733,14 +781,14 @@
|
|
733
781
|
</accepts>
|
734
782
|
<usages>
|
735
783
|
<usage>__init__</usage>
|
784
|
+
<usage>Assert Href To Resource Is Valid</usage>
|
736
785
|
<usage>Authorized Request</usage>
|
737
|
-
<usage>Get Invalid
|
786
|
+
<usage>Get Invalid Body Data</usage>
|
738
787
|
<usage>Get Invalidated Parameters</usage>
|
739
|
-
<usage>Get Json Data For Dto Class</usage>
|
740
788
|
<usage>Get Json Data With Conflict</usage>
|
789
|
+
<usage>Get Request Values</usage>
|
741
790
|
<usage>Perform Validated Request</usage>
|
742
791
|
<usage>Set Extra Headers</usage>
|
743
|
-
<usage>Validate Resource Properties</usage>
|
744
792
|
<usage>Validate Response</usage>
|
745
793
|
<usage>Validate Send Response</usage>
|
746
794
|
</usages>
|
@@ -754,8 +802,7 @@
|
|
754
802
|
<type>Real</type>
|
755
803
|
</accepts>
|
756
804
|
<usages>
|
757
|
-
<usage>
|
758
|
-
<usage>Get Valid Id For Endpoint</usage>
|
805
|
+
<usage>Get Valid Id For Path</usage>
|
759
806
|
</usages>
|
760
807
|
</type>
|
761
808
|
<type name="integer" type="Standard">
|
@@ -769,11 +816,11 @@
|
|
769
816
|
</accepts>
|
770
817
|
<usages>
|
771
818
|
<usage>__init__</usage>
|
772
|
-
<usage>
|
773
|
-
<usage>Get Invalid Json Data</usage>
|
819
|
+
<usage>Get Invalid Body Data</usage>
|
774
820
|
<usage>Get Invalidated Parameters</usage>
|
821
|
+
<usage>Get Invalidated Url</usage>
|
775
822
|
<usage>Get Json Data With Conflict</usage>
|
776
|
-
<usage>Get Valid Id For
|
823
|
+
<usage>Get Valid Id For Path</usage>
|
777
824
|
<usage>Perform Validated Request</usage>
|
778
825
|
</usages>
|
779
826
|
</type>
|
@@ -787,7 +834,6 @@
|
|
787
834
|
</accepts>
|
788
835
|
<usages>
|
789
836
|
<usage>__init__</usage>
|
790
|
-
<usage>Authorized Request</usage>
|
791
837
|
<usage>Get Ids From Url</usage>
|
792
838
|
</usages>
|
793
839
|
</type>
|
@@ -799,11 +845,6 @@
|
|
799
845
|
<usages>
|
800
846
|
<usage>__init__</usage>
|
801
847
|
<usage>Authorized Request</usage>
|
802
|
-
<usage>Get Invalidated Url</usage>
|
803
|
-
<usage>Get Json Data For Dto Class</usage>
|
804
|
-
<usage>Perform Validated Request</usage>
|
805
|
-
<usage>Validate Response</usage>
|
806
|
-
<usage>Validate Send Response</usage>
|
807
848
|
</usages>
|
808
849
|
</type>
|
809
850
|
<type name="Path" type="Standard">
|
@@ -824,24 +865,24 @@
|
|
824
865
|
</accepts>
|
825
866
|
<usages>
|
826
867
|
<usage>__init__</usage>
|
868
|
+
<usage>Assert Href To Resource Is Valid</usage>
|
827
869
|
<usage>Authorized Request</usage>
|
828
870
|
<usage>Ensure In Use</usage>
|
829
871
|
<usage>Get Ids From Url</usage>
|
830
|
-
<usage>Get Invalid
|
872
|
+
<usage>Get Invalid Body Data</usage>
|
831
873
|
<usage>Get Invalidated Parameters</usage>
|
832
874
|
<usage>Get Invalidated Url</usage>
|
833
|
-
<usage>Get Json Data For Dto Class</usage>
|
834
875
|
<usage>Get Json Data With Conflict</usage>
|
835
|
-
<usage>Get Parameterized
|
876
|
+
<usage>Get Parameterized Path From Url</usage>
|
836
877
|
<usage>Get Request Data</usage>
|
837
|
-
<usage>Get
|
878
|
+
<usage>Get Request Values</usage>
|
879
|
+
<usage>Get Valid Id For Path</usage>
|
838
880
|
<usage>Get Valid Url</usage>
|
839
881
|
<usage>Perform Validated Request</usage>
|
840
882
|
<usage>Set Basic Auth</usage>
|
841
883
|
<usage>Set Extra Headers</usage>
|
842
884
|
<usage>Set Origin</usage>
|
843
885
|
<usage>Set Security Token</usage>
|
844
|
-
<usage>Validate Resource Properties</usage>
|
845
886
|
<usage>Validate Response</usage>
|
846
887
|
<usage>Validate Send Response</usage>
|
847
888
|
</usages>
|
@@ -860,7 +901,7 @@
|
|
860
901
|
</usages>
|
861
902
|
</type>
|
862
903
|
<type name="ValidationLevel" type="Enum">
|
863
|
-
<doc
|
904
|
+
<doc>The available levels for the response_validation parameter.</doc>
|
864
905
|
<accepts>
|
865
906
|
<type>string</type>
|
866
907
|
</accepts>
|