robotframework-openapitools 0.2.2__py3-none-any.whl → 0.3.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.
@@ -20,7 +20,7 @@ run_keyword = BuiltIn().run_keyword
20
20
  logger = getLogger(__name__)
21
21
 
22
22
 
23
- @library(scope="TEST SUITE", doc_format="ROBOT")
23
+ @library(scope="SUITE", doc_format="ROBOT")
24
24
  class OpenApiExecutors(OpenApiLibCore): # pylint: disable=too-many-instance-attributes
25
25
  """Main class providing the keywords and core logic to perform endpoint validations."""
26
26
 
@@ -52,9 +52,13 @@ class OpenApiExecutors(OpenApiLibCore): # pylint: disable=too-many-instance-att
52
52
  source=source,
53
53
  origin=origin,
54
54
  base_path=base_path,
55
+ response_validation=response_validation,
56
+ disable_server_validation=disable_server_validation,
55
57
  mappings_path=mappings_path,
56
58
  default_id_property_name=default_id_property_name,
59
+ invalid_property_default_response=invalid_property_default_response,
57
60
  faker_locale=faker_locale,
61
+ require_body_for_invalid_url=require_body_for_invalid_url,
58
62
  recursion_limit=recursion_limit,
59
63
  recursion_default=recursion_default,
60
64
  username=username,
@@ -67,10 +71,6 @@ class OpenApiExecutors(OpenApiLibCore): # pylint: disable=too-many-instance-att
67
71
  cookies=cookies,
68
72
  proxies=proxies,
69
73
  )
70
- self.response_validation = response_validation
71
- self.disable_server_validation = disable_server_validation
72
- self.require_body_for_invalid_url = require_body_for_invalid_url
73
- self.invalid_property_default_response = invalid_property_default_response
74
74
 
75
75
  @keyword
76
76
  def test_unauthorized(self, path: str, method: str) -> None:
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <keywordspec name="OpenApiDriver" type="LIBRARY" format="HTML" scope="SUITE" generated="2024-05-15T18:47:16+00:00" specversion="5" source="/workspaces/robotframework-openapitools/src/OpenApiDriver/openapidriver.py" lineno="352">
3
- <version>0.2.2</version>
2
+ <keywordspec name="OpenApiDriver" type="LIBRARY" format="HTML" scope="SUITE" generated="2024-08-09T12:54:30+00:00" specversion="6" source="/workspaces/robotframework-openapitools/src/OpenApiDriver/openapidriver.py" lineno="352">
3
+ <version>0.3.0</version>
4
4
  <doc>&lt;p&gt;Visit the &lt;a href="https://github.com/MarketSquare/robotframework-openapidriver"&gt;library page&lt;/a&gt; for an introduction and examples.&lt;/p&gt;</doc>
5
5
  <tags>
6
6
  </tags>
@@ -9,126 +9,192 @@
9
9
  <arguments repr="source: str, origin: str = , base_path: str = , included_paths: Iterable[str] | None = None, ignored_paths: Iterable[str] | None = None, ignored_responses: Iterable[int] | None = None, ignored_testcases: Iterable[Tuple[str, str, int]] | None = None, 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] | None = None, require_body_for_invalid_url: bool = False, recursion_limit: int = 1, recursion_default: Any = {}, username: str = , password: str = , security_token: str = , auth: AuthBase | None = None, cert: str | Tuple[str, str] | None = None, verify_tls: bool | str | None = True, extra_headers: Dict[str, str] | None = None, cookies: Dict[str, str] | RequestsCookieJar | None = None, proxies: Dict[str, str] | None = None">
10
10
  <arg kind="POSITIONAL_OR_NAMED" required="true" repr="source: str">
11
11
  <name>source</name>
12
- <type name="str" typedoc="string">str</type>
12
+ <type name="str" typedoc="string"/>
13
13
  </arg>
14
14
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="origin: str = ">
15
15
  <name>origin</name>
16
- <type name="str" typedoc="string">str</type>
16
+ <type name="str" typedoc="string"/>
17
17
  <default/>
18
18
  </arg>
19
19
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="base_path: str = ">
20
20
  <name>base_path</name>
21
- <type name="str" typedoc="string">str</type>
21
+ <type name="str" typedoc="string"/>
22
22
  <default/>
23
23
  </arg>
24
24
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="included_paths: Iterable[str] | None = None">
25
25
  <name>included_paths</name>
26
- <type name="Union" union="true">Iterable[str] | None<type name="Iterable">Iterable[str]<type name="str" typedoc="string">str</type></type><type name="None" typedoc="None">None</type></type>
26
+ <type name="Union" union="true">
27
+ <type name="Iterable">
28
+ <type name="str" typedoc="string"/>
29
+ </type>
30
+ <type name="None" typedoc="None"/>
31
+ </type>
27
32
  <default>None</default>
28
33
  </arg>
29
34
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="ignored_paths: Iterable[str] | None = None">
30
35
  <name>ignored_paths</name>
31
- <type name="Union" union="true">Iterable[str] | None<type name="Iterable">Iterable[str]<type name="str" typedoc="string">str</type></type><type name="None" typedoc="None">None</type></type>
36
+ <type name="Union" union="true">
37
+ <type name="Iterable">
38
+ <type name="str" typedoc="string"/>
39
+ </type>
40
+ <type name="None" typedoc="None"/>
41
+ </type>
32
42
  <default>None</default>
33
43
  </arg>
34
44
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="ignored_responses: Iterable[int] | None = None">
35
45
  <name>ignored_responses</name>
36
- <type name="Union" union="true">Iterable[int] | None<type name="Iterable">Iterable[int]<type name="int" typedoc="integer">int</type></type><type name="None" typedoc="None">None</type></type>
46
+ <type name="Union" union="true">
47
+ <type name="Iterable">
48
+ <type name="int" typedoc="integer"/>
49
+ </type>
50
+ <type name="None" typedoc="None"/>
51
+ </type>
37
52
  <default>None</default>
38
53
  </arg>
39
54
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="ignored_testcases: Iterable[Tuple[str, str, int]] | None = None">
40
55
  <name>ignored_testcases</name>
41
- <type name="Union" union="true">Iterable[Tuple[str, str, int]] | None<type name="Iterable">Iterable[Tuple[str, str, int]]<type name="Tuple" typedoc="tuple">Tuple[str, str, int]<type name="str" typedoc="string">str</type><type name="str" typedoc="string">str</type><type name="int" typedoc="integer">int</type></type></type><type name="None" typedoc="None">None</type></type>
56
+ <type name="Union" union="true">
57
+ <type name="Iterable">
58
+ <type name="Tuple" typedoc="tuple">
59
+ <type name="str" typedoc="string"/>
60
+ <type name="str" typedoc="string"/>
61
+ <type name="int" typedoc="integer"/>
62
+ </type>
63
+ </type>
64
+ <type name="None" typedoc="None"/>
65
+ </type>
42
66
  <default>None</default>
43
67
  </arg>
44
68
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="response_validation: ValidationLevel = WARN">
45
69
  <name>response_validation</name>
46
- <type name="ValidationLevel" typedoc="ValidationLevel">ValidationLevel</type>
70
+ <type name="ValidationLevel" typedoc="ValidationLevel"/>
47
71
  <default>WARN</default>
48
72
  </arg>
49
73
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="disable_server_validation: bool = True">
50
74
  <name>disable_server_validation</name>
51
- <type name="bool" typedoc="boolean">bool</type>
75
+ <type name="bool" typedoc="boolean"/>
52
76
  <default>True</default>
53
77
  </arg>
54
78
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="mappings_path: str | Path = ">
55
79
  <name>mappings_path</name>
56
- <type name="Union" union="true">str | Path<type name="str" typedoc="string">str</type><type name="Path" typedoc="Path">Path</type></type>
80
+ <type name="Union" union="true">
81
+ <type name="str" typedoc="string"/>
82
+ <type name="Path" typedoc="Path"/>
83
+ </type>
57
84
  <default/>
58
85
  </arg>
59
86
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="invalid_property_default_response: int = 422">
60
87
  <name>invalid_property_default_response</name>
61
- <type name="int" typedoc="integer">int</type>
88
+ <type name="int" typedoc="integer"/>
62
89
  <default>422</default>
63
90
  </arg>
64
91
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="default_id_property_name: str = id">
65
92
  <name>default_id_property_name</name>
66
- <type name="str" typedoc="string">str</type>
93
+ <type name="str" typedoc="string"/>
67
94
  <default>id</default>
68
95
  </arg>
69
96
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="faker_locale: str | List[str] | None = None">
70
97
  <name>faker_locale</name>
71
- <type name="Union" union="true">str | List[str] | None<type name="str" typedoc="string">str</type><type name="List" typedoc="list">List[str]<type name="str" typedoc="string">str</type></type><type name="None" typedoc="None">None</type></type>
98
+ <type name="Union" union="true">
99
+ <type name="str" typedoc="string"/>
100
+ <type name="List" typedoc="list">
101
+ <type name="str" typedoc="string"/>
102
+ </type>
103
+ <type name="None" typedoc="None"/>
104
+ </type>
72
105
  <default>None</default>
73
106
  </arg>
74
107
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="require_body_for_invalid_url: bool = False">
75
108
  <name>require_body_for_invalid_url</name>
76
- <type name="bool" typedoc="boolean">bool</type>
109
+ <type name="bool" typedoc="boolean"/>
77
110
  <default>False</default>
78
111
  </arg>
79
112
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="recursion_limit: int = 1">
80
113
  <name>recursion_limit</name>
81
- <type name="int" typedoc="integer">int</type>
114
+ <type name="int" typedoc="integer"/>
82
115
  <default>1</default>
83
116
  </arg>
84
117
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="recursion_default: Any = {}">
85
118
  <name>recursion_default</name>
86
- <type name="Any" typedoc="Any">Any</type>
119
+ <type name="Any" typedoc="Any"/>
87
120
  <default>{}</default>
88
121
  </arg>
89
122
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="username: str = ">
90
123
  <name>username</name>
91
- <type name="str" typedoc="string">str</type>
124
+ <type name="str" typedoc="string"/>
92
125
  <default/>
93
126
  </arg>
94
127
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="password: str = ">
95
128
  <name>password</name>
96
- <type name="str" typedoc="string">str</type>
129
+ <type name="str" typedoc="string"/>
97
130
  <default/>
98
131
  </arg>
99
132
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="security_token: str = ">
100
133
  <name>security_token</name>
101
- <type name="str" typedoc="string">str</type>
134
+ <type name="str" typedoc="string"/>
102
135
  <default/>
103
136
  </arg>
104
137
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="auth: AuthBase | None = None">
105
138
  <name>auth</name>
106
- <type name="Union" union="true">AuthBase | None<type name="AuthBase">AuthBase</type><type name="None" typedoc="None">None</type></type>
139
+ <type name="Union" union="true">
140
+ <type name="AuthBase"/>
141
+ <type name="None" typedoc="None"/>
142
+ </type>
107
143
  <default>None</default>
108
144
  </arg>
109
145
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="cert: str | Tuple[str, str] | None = None">
110
146
  <name>cert</name>
111
- <type name="Union" union="true">str | Tuple[str, str] | None<type name="str" typedoc="string">str</type><type name="Tuple" typedoc="tuple">Tuple[str, str]<type name="str" typedoc="string">str</type><type name="str" typedoc="string">str</type></type><type name="None" typedoc="None">None</type></type>
147
+ <type name="Union" union="true">
148
+ <type name="str" typedoc="string"/>
149
+ <type name="Tuple" typedoc="tuple">
150
+ <type name="str" typedoc="string"/>
151
+ <type name="str" typedoc="string"/>
152
+ </type>
153
+ <type name="None" typedoc="None"/>
154
+ </type>
112
155
  <default>None</default>
113
156
  </arg>
114
157
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="verify_tls: bool | str | None = True">
115
158
  <name>verify_tls</name>
116
- <type name="Union" union="true">bool | str | None<type name="bool" typedoc="boolean">bool</type><type name="str" typedoc="string">str</type><type name="None" typedoc="None">None</type></type>
159
+ <type name="Union" union="true">
160
+ <type name="bool" typedoc="boolean"/>
161
+ <type name="str" typedoc="string"/>
162
+ <type name="None" typedoc="None"/>
163
+ </type>
117
164
  <default>True</default>
118
165
  </arg>
119
166
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="extra_headers: Dict[str, str] | None = None">
120
167
  <name>extra_headers</name>
121
- <type name="Union" union="true">Dict[str, str] | None<type name="Dict" typedoc="dictionary">Dict[str, str]<type name="str" typedoc="string">str</type><type name="str" typedoc="string">str</type></type><type name="None" typedoc="None">None</type></type>
168
+ <type name="Union" union="true">
169
+ <type name="Dict" typedoc="dictionary">
170
+ <type name="str" typedoc="string"/>
171
+ <type name="str" typedoc="string"/>
172
+ </type>
173
+ <type name="None" typedoc="None"/>
174
+ </type>
122
175
  <default>None</default>
123
176
  </arg>
124
177
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="cookies: Dict[str, str] | RequestsCookieJar | None = None">
125
178
  <name>cookies</name>
126
- <type name="Union" union="true">Dict[str, str] | RequestsCookieJar | None<type name="Dict" typedoc="dictionary">Dict[str, str]<type name="str" typedoc="string">str</type><type name="str" typedoc="string">str</type></type><type name="RequestsCookieJar" typedoc="dictionary">RequestsCookieJar</type><type name="None" typedoc="None">None</type></type>
179
+ <type name="Union" union="true">
180
+ <type name="Dict" typedoc="dictionary">
181
+ <type name="str" typedoc="string"/>
182
+ <type name="str" typedoc="string"/>
183
+ </type>
184
+ <type name="RequestsCookieJar" typedoc="dictionary"/>
185
+ <type name="None" typedoc="None"/>
186
+ </type>
127
187
  <default>None</default>
128
188
  </arg>
129
189
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="proxies: Dict[str, str] | None = None">
130
190
  <name>proxies</name>
131
- <type name="Union" union="true">Dict[str, str] | None<type name="Dict" typedoc="dictionary">Dict[str, str]<type name="str" typedoc="string">str</type><type name="str" typedoc="string">str</type></type><type name="None" typedoc="None">None</type></type>
191
+ <type name="Union" union="true">
192
+ <type name="Dict" typedoc="dictionary">
193
+ <type name="str" typedoc="string"/>
194
+ <type name="str" typedoc="string"/>
195
+ </type>
196
+ <type name="None" typedoc="None"/>
197
+ </type>
132
198
  <default>None</default>
133
199
  </arg>
134
200
  </arguments>
@@ -203,15 +269,15 @@
203
269
  <arguments repr="path: str, method: str, status_code: int">
204
270
  <arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
205
271
  <name>path</name>
206
- <type name="str" typedoc="string">str</type>
272
+ <type name="str" typedoc="string"/>
207
273
  </arg>
208
274
  <arg kind="POSITIONAL_OR_NAMED" required="true" repr="method: str">
209
275
  <name>method</name>
210
- <type name="str" typedoc="string">str</type>
276
+ <type name="str" typedoc="string"/>
211
277
  </arg>
212
278
  <arg kind="POSITIONAL_OR_NAMED" required="true" repr="status_code: int">
213
279
  <name>status_code</name>
214
- <type name="int" typedoc="integer">int</type>
280
+ <type name="int" typedoc="integer"/>
215
281
  </arg>
216
282
  </arguments>
217
283
  <doc>&lt;p&gt;Validate that performing the &lt;span class="name"&gt;method&lt;/span&gt; operation on &lt;a href="#type-Path" class="name"&gt;path&lt;/a&gt; results in a &lt;span class="name"&gt;status_code&lt;/span&gt; response.&lt;/p&gt;
@@ -223,11 +289,11 @@
223
289
  <arguments repr="path: str, method: str">
224
290
  <arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
225
291
  <name>path</name>
226
- <type name="str" typedoc="string">str</type>
292
+ <type name="str" typedoc="string"/>
227
293
  </arg>
228
294
  <arg kind="POSITIONAL_OR_NAMED" required="true" repr="method: str">
229
295
  <name>method</name>
230
- <type name="str" typedoc="string">str</type>
296
+ <type name="str" typedoc="string"/>
231
297
  </arg>
232
298
  </arguments>
233
299
  <doc>&lt;p&gt;Perform a request for &lt;span class="name"&gt;method&lt;/span&gt; on the &lt;a href="#type-Path" class="name"&gt;path&lt;/a&gt;, with the provided authorization.&lt;/p&gt;
@@ -239,15 +305,15 @@
239
305
  <arguments repr="path: str, method: str, expected_status_code: int = 404">
240
306
  <arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
241
307
  <name>path</name>
242
- <type name="str" typedoc="string">str</type>
308
+ <type name="str" typedoc="string"/>
243
309
  </arg>
244
310
  <arg kind="POSITIONAL_OR_NAMED" required="true" repr="method: str">
245
311
  <name>method</name>
246
- <type name="str" typedoc="string">str</type>
312
+ <type name="str" typedoc="string"/>
247
313
  </arg>
248
314
  <arg kind="POSITIONAL_OR_NAMED" required="false" repr="expected_status_code: int = 404">
249
315
  <name>expected_status_code</name>
250
- <type name="int" typedoc="integer">int</type>
316
+ <type name="int" typedoc="integer"/>
251
317
  <default>404</default>
252
318
  </arg>
253
319
  </arguments>
@@ -261,11 +327,11 @@
261
327
  <arguments repr="path: str, method: str">
262
328
  <arg kind="POSITIONAL_OR_NAMED" required="true" repr="path: str">
263
329
  <name>path</name>
264
- <type name="str" typedoc="string">str</type>
330
+ <type name="str" typedoc="string"/>
265
331
  </arg>
266
332
  <arg kind="POSITIONAL_OR_NAMED" required="true" repr="method: str">
267
333
  <name>method</name>
268
- <type name="str" typedoc="string">str</type>
334
+ <type name="str" typedoc="string"/>
269
335
  </arg>
270
336
  </arguments>
271
337
  <doc>&lt;p&gt;Perform a request for &lt;span class="name"&gt;method&lt;/span&gt; on the &lt;a href="#type-Path" class="name"&gt;path&lt;/a&gt;, with no authorization.&lt;/p&gt;
@@ -274,19 +340,6 @@
274
340
  <shortdoc>Perform a request for `method` on the `path`, with no authorization.</shortdoc>
275
341
  </kw>
276
342
  </keywords>
277
- <datatypes>
278
- <enums>
279
- <enum name="ValidationLevel">
280
- <doc>&lt;p&gt;The available levels for the response_validation parameter.&lt;/p&gt;</doc>
281
- <members>
282
- <member name="DISABLED" value="DISABLED"/>
283
- <member name="INFO" value="INFO"/>
284
- <member name="WARN" value="WARN"/>
285
- <member name="STRICT" value="STRICT"/>
286
- </members>
287
- </enum>
288
- </enums>
289
- </datatypes>
290
343
  <typedocs>
291
344
  <type name="Any" type="Standard">
292
345
  <doc>&lt;p&gt;Any value is accepted. No conversion is done.&lt;/p&gt;</doc>
@@ -134,7 +134,7 @@ from OpenApiDriver.openapi_executors import OpenApiExecutors, ValidationLevel
134
134
  from OpenApiDriver.openapi_reader import OpenApiReader
135
135
 
136
136
 
137
- @library(scope="TEST SUITE", doc_format="ROBOT")
137
+ @library(scope="SUITE", doc_format="ROBOT")
138
138
  class OpenApiDriver(OpenApiExecutors, DataDriver):
139
139
  """
140
140
  Visit the [https://github.com/MarketSquare/robotframework-openapidriver | library page]