robotframework-openapitools 0.4.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 +78 -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 +67 -130
- 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 +355 -330
- OpenApiLibCore/openapi_libcore.py +385 -1953
- 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.4.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.4.0.dist-info/METADATA +0 -42
- robotframework_openapitools-0.4.0.dist-info/RECORD +0 -41
- {robotframework_openapitools-0.4.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
328
|
<type name="JSON"/>
|
258
|
-
</type>
|
259
|
-
<type name="List" typedoc="list">
|
260
|
-
<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,21 +429,22 @@
|
|
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, path: 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"/>
|
@@ -396,60 +454,22 @@
|
|
396
454
|
<type name="str" typedoc="string"/>
|
397
455
|
<default/>
|
398
456
|
</arg>
|
399
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="method: str = ">
|
400
|
-
<name>method</name>
|
401
|
-
<type name="str" typedoc="string"/>
|
402
|
-
<default/>
|
403
|
-
</arg>
|
404
457
|
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="expected_status_code: int = 404">
|
405
458
|
<name>expected_status_code</name>
|
406
459
|
<type name="int" typedoc="integer"/>
|
407
460
|
<default>404</default>
|
408
461
|
</arg>
|
409
462
|
</arguments>
|
410
|
-
<returntype name="
|
411
|
-
<
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
<kw name="Get Json Data For Dto Class" lineno="1232">
|
419
|
-
<arguments repr="schema: Dict[str, Any], dto_class: Dto | Type[Dto], operation_id: str = ">
|
420
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="schema: Dict[str, Any]">
|
421
|
-
<name>schema</name>
|
422
|
-
<type name="Dict" typedoc="dictionary">
|
423
|
-
<type name="str" typedoc="string"/>
|
424
|
-
<type name="Any" typedoc="Any"/>
|
425
|
-
</type>
|
426
|
-
</arg>
|
427
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="dto_class: Dto | Type[Dto]">
|
428
|
-
<name>dto_class</name>
|
429
|
-
<type name="Union" union="true">
|
430
|
-
<type name="Dto"/>
|
431
|
-
<type name="Type">
|
432
|
-
<type name="Dto"/>
|
433
|
-
</type>
|
434
|
-
</type>
|
435
|
-
</arg>
|
436
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="operation_id: str = ">
|
437
|
-
<name>operation_id</name>
|
438
|
-
<type name="str" typedoc="string"/>
|
439
|
-
<default/>
|
440
|
-
</arg>
|
441
|
-
</arguments>
|
442
|
-
<returntype name="Union" union="true">
|
443
|
-
<type name="Dict" typedoc="dictionary">
|
444
|
-
<type name="str" typedoc="string"/>
|
445
|
-
<type name="Any" typedoc="Any"/>
|
446
|
-
</type>
|
447
|
-
<type name="None" typedoc="None"/>
|
448
|
-
</returntype>
|
449
|
-
<doc><p>Generate a valid (json-compatible) dict for all the <span class="name">dto_class</span> properties.</p></doc>
|
450
|
-
<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>
|
451
471
|
</kw>
|
452
|
-
<kw name="Get Json Data With Conflict" lineno="
|
472
|
+
<kw name="Get Json Data With Conflict" lineno="292">
|
453
473
|
<arguments repr="url: str, method: str, dto: Dto, conflict_status_code: int">
|
454
474
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
455
475
|
<name>url</name>
|
@@ -468,14 +488,16 @@
|
|
468
488
|
<type name="int" typedoc="integer"/>
|
469
489
|
</arg>
|
470
490
|
</arguments>
|
471
|
-
<returntype name="
|
491
|
+
<returntype name="dict" typedoc="dictionary">
|
472
492
|
<type name="str" typedoc="string"/>
|
473
|
-
<type name="
|
493
|
+
<type name="JSON"/>
|
474
494
|
</returntype>
|
475
|
-
<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>
|
476
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>
|
477
499
|
</kw>
|
478
|
-
<kw name="Get Parameterized
|
500
|
+
<kw name="Get Parameterized Path From Url" lineno="342">
|
479
501
|
<arguments repr="url: str">
|
480
502
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="url: str">
|
481
503
|
<name>url</name>
|
@@ -483,13 +505,13 @@
|
|
483
505
|
</arg>
|
484
506
|
</arguments>
|
485
507
|
<returntype name="str" typedoc="string"/>
|
486
|
-
<doc
|
487
|
-
<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>
|
488
510
|
</kw>
|
489
|
-
<kw name="Get Request Data" lineno="
|
490
|
-
<arguments repr="
|
491
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="
|
492
|
-
<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>
|
493
515
|
<type name="str" typedoc="string"/>
|
494
516
|
</arg>
|
495
517
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="method: str">
|
@@ -498,48 +520,70 @@
|
|
498
520
|
</arg>
|
499
521
|
</arguments>
|
500
522
|
<returntype name="RequestData"/>
|
501
|
-
<doc
|
523
|
+
<doc>Return an object with valid request data for body, headers and query params.</doc>
|
502
524
|
<shortdoc>Return an object with valid request data for body, headers and query params.</shortdoc>
|
503
525
|
</kw>
|
504
|
-
<kw name="Get
|
505
|
-
<arguments repr="
|
506
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="
|
507
|
-
<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>
|
508
530
|
<type name="str" typedoc="string"/>
|
509
531
|
</arg>
|
510
532
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="method: str">
|
511
533
|
<name>method</name>
|
512
534
|
<type name="str" typedoc="string"/>
|
513
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>
|
514
555
|
</arguments>
|
515
556
|
<returntype name="Union" union="true">
|
516
557
|
<type name="str" typedoc="string"/>
|
517
558
|
<type name="int" typedoc="integer"/>
|
518
559
|
<type name="float" typedoc="float"/>
|
519
560
|
</returntype>
|
520
|
-
<doc
|
521
|
-
|
522
|
-
|
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>
|
523
566
|
</kw>
|
524
|
-
<kw name="Get Valid Url" lineno="
|
525
|
-
<arguments repr="
|
526
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="
|
527
|
-
<name>
|
528
|
-
<type name="str" typedoc="string"/>
|
529
|
-
</arg>
|
530
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="method: str">
|
531
|
-
<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>
|
532
571
|
<type name="str" typedoc="string"/>
|
533
572
|
</arg>
|
534
573
|
</arguments>
|
535
574
|
<returntype name="str" typedoc="string"/>
|
536
|
-
<doc
|
537
|
-
|
538
|
-
|
539
|
-
|
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>
|
540
584
|
</kw>
|
541
|
-
<kw name="Perform Validated Request" lineno="
|
542
|
-
<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] = {}">
|
543
587
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
544
588
|
<name>path</name>
|
545
589
|
<type name="str" typedoc="string"/>
|
@@ -552,33 +596,34 @@
|
|
552
596
|
<name>request_values</name>
|
553
597
|
<type name="RequestValues"/>
|
554
598
|
</arg>
|
555
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data:
|
599
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data: Mapping[str, JSON] = {}">
|
556
600
|
<name>original_data</name>
|
557
|
-
<type name="
|
558
|
-
<type name="Dict" typedoc="dictionary">
|
601
|
+
<type name="Mapping" typedoc="dictionary">
|
559
602
|
<type name="str" typedoc="string"/>
|
560
|
-
<type name="
|
561
|
-
</type>
|
562
|
-
<type name="None" typedoc="None"/>
|
603
|
+
<type name="JSON"/>
|
563
604
|
</type>
|
564
|
-
<default>
|
605
|
+
<default>{}</default>
|
565
606
|
</arg>
|
566
607
|
</arguments>
|
567
|
-
<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>
|
568
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>
|
569
612
|
</kw>
|
570
|
-
<kw name="Set Auth" lineno="
|
613
|
+
<kw name="Set Auth" lineno="179">
|
571
614
|
<arguments repr="auth: AuthBase">
|
572
615
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="auth: AuthBase">
|
573
616
|
<name>auth</name>
|
574
617
|
<type name="AuthBase"/>
|
575
618
|
</arg>
|
576
619
|
</arguments>
|
577
|
-
<doc
|
578
|
-
|
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>
|
579
624
|
<shortdoc>Set the `auth` used for authentication after the library is imported.</shortdoc>
|
580
625
|
</kw>
|
581
|
-
<kw name="Set Basic Auth" lineno="
|
626
|
+
<kw name="Set Basic Auth" lineno="167">
|
582
627
|
<arguments repr="username: str, password: str">
|
583
628
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="username: str">
|
584
629
|
<name>username</name>
|
@@ -589,69 +634,60 @@
|
|
589
634
|
<type name="str" typedoc="string"/>
|
590
635
|
</arg>
|
591
636
|
</arguments>
|
592
|
-
<doc
|
593
|
-
|
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>
|
594
642
|
<shortdoc>Set the `username` and `password` used for basic authentication after the library is imported.</shortdoc>
|
595
643
|
</kw>
|
596
|
-
<kw name="Set Extra Headers" lineno="
|
597
|
-
<arguments repr="extra_headers:
|
598
|
-
<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]">
|
599
647
|
<name>extra_headers</name>
|
600
|
-
<type name="
|
648
|
+
<type name="dict" typedoc="dictionary">
|
601
649
|
<type name="str" typedoc="string"/>
|
602
650
|
<type name="str" typedoc="string"/>
|
603
651
|
</type>
|
604
652
|
</arg>
|
605
653
|
</arguments>
|
606
|
-
<doc
|
607
|
-
|
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>
|
608
658
|
<shortdoc>Set the `extra_headers` used in requests after the library is imported.</shortdoc>
|
609
659
|
</kw>
|
610
|
-
<kw name="Set Origin" lineno="
|
660
|
+
<kw name="Set Origin" lineno="144">
|
611
661
|
<arguments repr="origin: str">
|
612
662
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="origin: str">
|
613
663
|
<name>origin</name>
|
614
664
|
<type name="str" typedoc="string"/>
|
615
665
|
</arg>
|
616
666
|
</arguments>
|
617
|
-
<doc
|
618
|
-
|
619
|
-
|
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>
|
620
675
|
<shortdoc>Set the `origin` after the library is imported.</shortdoc>
|
621
676
|
</kw>
|
622
|
-
<kw name="Set Security Token" lineno="
|
677
|
+
<kw name="Set Security Token" lineno="158">
|
623
678
|
<arguments repr="security_token: str">
|
624
679
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="security_token: str">
|
625
680
|
<name>security_token</name>
|
626
681
|
<type name="str" typedoc="string"/>
|
627
682
|
</arg>
|
628
683
|
</arguments>
|
629
|
-
<doc
|
630
|
-
|
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>
|
631
687
|
<shortdoc>Set the `security_token` after the library is imported.</shortdoc>
|
632
688
|
</kw>
|
633
|
-
<kw name="Validate
|
634
|
-
<arguments repr="
|
635
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="resource: Dict[str, Any]">
|
636
|
-
<name>resource</name>
|
637
|
-
<type name="Dict" typedoc="dictionary">
|
638
|
-
<type name="str" typedoc="string"/>
|
639
|
-
<type name="Any" typedoc="Any"/>
|
640
|
-
</type>
|
641
|
-
</arg>
|
642
|
-
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="schema: Dict[str, Any]">
|
643
|
-
<name>schema</name>
|
644
|
-
<type name="Dict" typedoc="dictionary">
|
645
|
-
<type name="str" typedoc="string"/>
|
646
|
-
<type name="Any" typedoc="Any"/>
|
647
|
-
</type>
|
648
|
-
</arg>
|
649
|
-
</arguments>
|
650
|
-
<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>
|
651
|
-
<shortdoc>Validate that the `resource` does not contain any properties that are not defined in the `schema_properties`.</shortdoc>
|
652
|
-
</kw>
|
653
|
-
<kw name="Validate Response" lineno="1852">
|
654
|
-
<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] = {}">
|
655
691
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
|
656
692
|
<name>path</name>
|
657
693
|
<type name="str" typedoc="string"/>
|
@@ -660,48 +696,55 @@
|
|
660
696
|
<name>response</name>
|
661
697
|
<type name="Response"/>
|
662
698
|
</arg>
|
663
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data:
|
699
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data: Mapping[str, JSON] = {}">
|
664
700
|
<name>original_data</name>
|
665
|
-
<type name="
|
666
|
-
<type name="Dict" typedoc="dictionary">
|
701
|
+
<type name="Mapping" typedoc="dictionary">
|
667
702
|
<type name="str" typedoc="string"/>
|
668
|
-
<type name="
|
669
|
-
</type>
|
670
|
-
<type name="None" typedoc="None"/>
|
703
|
+
<type name="JSON"/>
|
671
704
|
</type>
|
672
|
-
<default>
|
705
|
+
<default>{}</default>
|
673
706
|
</arg>
|
674
707
|
</arguments>
|
675
|
-
<doc
|
676
|
-
<
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
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>
|
685
728
|
</kw>
|
686
|
-
<kw name="Validate Send Response" lineno="
|
687
|
-
<arguments repr="response: Response, original_data:
|
729
|
+
<kw name="Validate Send Response" lineno="531">
|
730
|
+
<arguments repr="response: Response, original_data: Mapping[str, JSON] = {}">
|
688
731
|
<arg kind="POSITIONAL_OR_NAMED" required="true" repr="response: Response">
|
689
732
|
<name>response</name>
|
690
733
|
<type name="Response"/>
|
691
734
|
</arg>
|
692
|
-
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data:
|
735
|
+
<arg kind="POSITIONAL_OR_NAMED" required="false" repr="original_data: Mapping[str, JSON] = {}">
|
693
736
|
<name>original_data</name>
|
694
|
-
<type name="
|
695
|
-
<type name="Dict" typedoc="dictionary">
|
737
|
+
<type name="Mapping" typedoc="dictionary">
|
696
738
|
<type name="str" typedoc="string"/>
|
697
|
-
<type name="
|
698
|
-
</type>
|
699
|
-
<type name="None" typedoc="None"/>
|
739
|
+
<type name="JSON"/>
|
700
740
|
</type>
|
701
|
-
<default>
|
741
|
+
<default>{}</default>
|
702
742
|
</arg>
|
703
743
|
</arguments>
|
704
|
-
<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>
|
705
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>
|
706
749
|
</kw>
|
707
750
|
</keywords>
|
@@ -712,16 +755,7 @@
|
|
712
755
|
<type>Any</type>
|
713
756
|
</accepts>
|
714
757
|
<usages>
|
715
|
-
<usage>__init__</usage>
|
716
758
|
<usage>Authorized Request</usage>
|
717
|
-
<usage>Get Invalid Json Data</usage>
|
718
|
-
<usage>Get Invalidated Parameters</usage>
|
719
|
-
<usage>Get Json Data For Dto Class</usage>
|
720
|
-
<usage>Get Json Data With Conflict</usage>
|
721
|
-
<usage>Perform Validated Request</usage>
|
722
|
-
<usage>Validate Resource Properties</usage>
|
723
|
-
<usage>Validate Response</usage>
|
724
|
-
<usage>Validate Send Response</usage>
|
725
759
|
</usages>
|
726
760
|
</type>
|
727
761
|
<type name="boolean" type="Standard">
|
@@ -735,7 +769,6 @@
|
|
735
769
|
</accepts>
|
736
770
|
<usages>
|
737
771
|
<usage>__init__</usage>
|
738
|
-
<usage>Authorized Request</usage>
|
739
772
|
</usages>
|
740
773
|
</type>
|
741
774
|
<type name="dictionary" type="Standard">
|
@@ -748,14 +781,14 @@
|
|
748
781
|
</accepts>
|
749
782
|
<usages>
|
750
783
|
<usage>__init__</usage>
|
784
|
+
<usage>Assert Href To Resource Is Valid</usage>
|
751
785
|
<usage>Authorized Request</usage>
|
752
|
-
<usage>Get Invalid
|
786
|
+
<usage>Get Invalid Body Data</usage>
|
753
787
|
<usage>Get Invalidated Parameters</usage>
|
754
|
-
<usage>Get Json Data For Dto Class</usage>
|
755
788
|
<usage>Get Json Data With Conflict</usage>
|
789
|
+
<usage>Get Request Values</usage>
|
756
790
|
<usage>Perform Validated Request</usage>
|
757
791
|
<usage>Set Extra Headers</usage>
|
758
|
-
<usage>Validate Resource Properties</usage>
|
759
792
|
<usage>Validate Response</usage>
|
760
793
|
<usage>Validate Send Response</usage>
|
761
794
|
</usages>
|
@@ -769,8 +802,7 @@
|
|
769
802
|
<type>Real</type>
|
770
803
|
</accepts>
|
771
804
|
<usages>
|
772
|
-
<usage>
|
773
|
-
<usage>Get Valid Id For Endpoint</usage>
|
805
|
+
<usage>Get Valid Id For Path</usage>
|
774
806
|
</usages>
|
775
807
|
</type>
|
776
808
|
<type name="integer" type="Standard">
|
@@ -784,12 +816,11 @@
|
|
784
816
|
</accepts>
|
785
817
|
<usages>
|
786
818
|
<usage>__init__</usage>
|
787
|
-
<usage>
|
788
|
-
<usage>Get Invalid Json Data</usage>
|
819
|
+
<usage>Get Invalid Body Data</usage>
|
789
820
|
<usage>Get Invalidated Parameters</usage>
|
790
821
|
<usage>Get Invalidated Url</usage>
|
791
822
|
<usage>Get Json Data With Conflict</usage>
|
792
|
-
<usage>Get Valid Id For
|
823
|
+
<usage>Get Valid Id For Path</usage>
|
793
824
|
<usage>Perform Validated Request</usage>
|
794
825
|
</usages>
|
795
826
|
</type>
|
@@ -803,7 +834,6 @@
|
|
803
834
|
</accepts>
|
804
835
|
<usages>
|
805
836
|
<usage>__init__</usage>
|
806
|
-
<usage>Authorized Request</usage>
|
807
837
|
<usage>Get Ids From Url</usage>
|
808
838
|
</usages>
|
809
839
|
</type>
|
@@ -815,11 +845,6 @@
|
|
815
845
|
<usages>
|
816
846
|
<usage>__init__</usage>
|
817
847
|
<usage>Authorized Request</usage>
|
818
|
-
<usage>Get Invalidated Url</usage>
|
819
|
-
<usage>Get Json Data For Dto Class</usage>
|
820
|
-
<usage>Perform Validated Request</usage>
|
821
|
-
<usage>Validate Response</usage>
|
822
|
-
<usage>Validate Send Response</usage>
|
823
848
|
</usages>
|
824
849
|
</type>
|
825
850
|
<type name="Path" type="Standard">
|
@@ -840,24 +865,24 @@
|
|
840
865
|
</accepts>
|
841
866
|
<usages>
|
842
867
|
<usage>__init__</usage>
|
868
|
+
<usage>Assert Href To Resource Is Valid</usage>
|
843
869
|
<usage>Authorized Request</usage>
|
844
870
|
<usage>Ensure In Use</usage>
|
845
871
|
<usage>Get Ids From Url</usage>
|
846
|
-
<usage>Get Invalid
|
872
|
+
<usage>Get Invalid Body Data</usage>
|
847
873
|
<usage>Get Invalidated Parameters</usage>
|
848
874
|
<usage>Get Invalidated Url</usage>
|
849
|
-
<usage>Get Json Data For Dto Class</usage>
|
850
875
|
<usage>Get Json Data With Conflict</usage>
|
851
|
-
<usage>Get Parameterized
|
876
|
+
<usage>Get Parameterized Path From Url</usage>
|
852
877
|
<usage>Get Request Data</usage>
|
853
|
-
<usage>Get
|
878
|
+
<usage>Get Request Values</usage>
|
879
|
+
<usage>Get Valid Id For Path</usage>
|
854
880
|
<usage>Get Valid Url</usage>
|
855
881
|
<usage>Perform Validated Request</usage>
|
856
882
|
<usage>Set Basic Auth</usage>
|
857
883
|
<usage>Set Extra Headers</usage>
|
858
884
|
<usage>Set Origin</usage>
|
859
885
|
<usage>Set Security Token</usage>
|
860
|
-
<usage>Validate Resource Properties</usage>
|
861
886
|
<usage>Validate Response</usage>
|
862
887
|
<usage>Validate Send Response</usage>
|
863
888
|
</usages>
|
@@ -876,7 +901,7 @@
|
|
876
901
|
</usages>
|
877
902
|
</type>
|
878
903
|
<type name="ValidationLevel" type="Enum">
|
879
|
-
<doc
|
904
|
+
<doc>The available levels for the response_validation parameter.</doc>
|
880
905
|
<accepts>
|
881
906
|
<type>string</type>
|
882
907
|
</accepts>
|