doc-detective-common 4.0.0-beta.0-dev.4 → 4.0.0-beta.0-dev.5

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.
Files changed (200) hide show
  1. package/package.json +1 -1
  2. package/.c8rc.json +0 -8
  3. package/.mocharc.yml +0 -1
  4. package/icon.png +0 -0
  5. package/scripts/check-coverage-ratchet.cjs +0 -123
  6. package/scripts/createCjsWrapper.js +0 -25
  7. package/scripts/generateTypes.cjs +0 -54
  8. package/src/detectTests.ts +0 -660
  9. package/src/index.ts +0 -3
  10. package/src/schemas/build/checkLink_v2.schema.json +0 -81
  11. package/src/schemas/build/checkLink_v3.schema.json +0 -92
  12. package/src/schemas/build/click_v3.schema.json +0 -145
  13. package/src/schemas/build/config_v2.schema.json +0 -1079
  14. package/src/schemas/build/config_v3.schema.json +0 -696
  15. package/src/schemas/build/context_v2.schema.json +0 -135
  16. package/src/schemas/build/context_v3.schema.json +0 -229
  17. package/src/schemas/build/dragAndDrop_v3.schema.json +0 -189
  18. package/src/schemas/build/find_v2.schema.json +0 -168
  19. package/src/schemas/build/find_v3.schema.json +0 -214
  20. package/src/schemas/build/goTo_v2.schema.json +0 -63
  21. package/src/schemas/build/goTo_v3.schema.json +0 -257
  22. package/src/schemas/build/httpRequest_v2.schema.json +0 -321
  23. package/src/schemas/build/httpRequest_v3.schema.json +0 -439
  24. package/src/schemas/build/loadCookie_v3.schema.json +0 -138
  25. package/src/schemas/build/loadVariables_v3.schema.json +0 -10
  26. package/src/schemas/build/moveTo_v2.schema.json +0 -99
  27. package/src/schemas/build/openApi_v2.schema.json +0 -76
  28. package/src/schemas/build/openApi_v3.schema.json +0 -161
  29. package/src/schemas/build/record_v3.schema.json +0 -70
  30. package/src/schemas/build/report_v3.schema.json +0 -53
  31. package/src/schemas/build/resolvedTests_v3.schema.json +0 -238
  32. package/src/schemas/build/runCode_v2.schema.json +0 -201
  33. package/src/schemas/build/runCode_v3.schema.json +0 -138
  34. package/src/schemas/build/runShell_v2.schema.json +0 -189
  35. package/src/schemas/build/runShell_v3.schema.json +0 -156
  36. package/src/schemas/build/saveCookie_v3.schema.json +0 -149
  37. package/src/schemas/build/saveScreenshot_v2.schema.json +0 -150
  38. package/src/schemas/build/screenshot_v3.schema.json +0 -250
  39. package/src/schemas/build/setVariables_v2.schema.json +0 -39
  40. package/src/schemas/build/sourceIntegration_v3.schema.json +0 -51
  41. package/src/schemas/build/spec_v2.schema.json +0 -199
  42. package/src/schemas/build/spec_v3.schema.json +0 -213
  43. package/src/schemas/build/startRecording_v2.schema.json +0 -57
  44. package/src/schemas/build/step_v3.schema.json +0 -669
  45. package/src/schemas/build/stopRecord_v3.schema.json +0 -13
  46. package/src/schemas/build/stopRecording_v2.schema.json +0 -33
  47. package/src/schemas/build/test_v2.schema.json +0 -244
  48. package/src/schemas/build/test_v3.schema.json +0 -292
  49. package/src/schemas/build/typeKeys_v2.schema.json +0 -72
  50. package/src/schemas/build/type_v3.schema.json +0 -131
  51. package/src/schemas/build/wait_v2.schema.json +0 -42
  52. package/src/schemas/build/wait_v3.schema.json +0 -37
  53. package/src/schemas/dereferenceSchemas.cjs +0 -208
  54. package/src/schemas/index.ts +0 -6
  55. package/src/schemas/output_schemas/analytics_v1.schema.json +0 -585
  56. package/src/schemas/output_schemas/checkLink_v1.schema.json +0 -42
  57. package/src/schemas/output_schemas/checkLink_v2.schema.json +0 -80
  58. package/src/schemas/output_schemas/checkLink_v3.schema.json +0 -145
  59. package/src/schemas/output_schemas/click_v1.schema.json +0 -60
  60. package/src/schemas/output_schemas/click_v3.schema.json +0 -252
  61. package/src/schemas/output_schemas/config_v2.schema.json +0 -2628
  62. package/src/schemas/output_schemas/config_v3.schema.json +0 -16470
  63. package/src/schemas/output_schemas/context_v2.schema.json +0 -134
  64. package/src/schemas/output_schemas/context_v3.schema.json +0 -374
  65. package/src/schemas/output_schemas/dragAndDrop_v3.schema.json +0 -496
  66. package/src/schemas/output_schemas/endRecord_v3.schema.json +0 -12
  67. package/src/schemas/output_schemas/find_v1.schema.json +0 -171
  68. package/src/schemas/output_schemas/find_v2.schema.json +0 -184
  69. package/src/schemas/output_schemas/find_v3.schema.json +0 -1349
  70. package/src/schemas/output_schemas/goTo_v1.schema.json +0 -30
  71. package/src/schemas/output_schemas/goTo_v2.schema.json +0 -62
  72. package/src/schemas/output_schemas/goTo_v3.schema.json +0 -419
  73. package/src/schemas/output_schemas/httpRequest_v1.schema.json +0 -115
  74. package/src/schemas/output_schemas/httpRequest_v2.schema.json +0 -392
  75. package/src/schemas/output_schemas/httpRequest_v3.schema.json +0 -994
  76. package/src/schemas/output_schemas/loadCookie_v3.schema.json +0 -228
  77. package/src/schemas/output_schemas/loadVariables_v3.schema.json +0 -9
  78. package/src/schemas/output_schemas/matchText_v1.schema.json +0 -32
  79. package/src/schemas/output_schemas/moveMouse_v1.schema.json +0 -60
  80. package/src/schemas/output_schemas/moveTo_v2.schema.json +0 -98
  81. package/src/schemas/output_schemas/openApi_v2.schema.json +0 -75
  82. package/src/schemas/output_schemas/openApi_v3.schema.json +0 -162
  83. package/src/schemas/output_schemas/record_v3.schema.json +0 -101
  84. package/src/schemas/output_schemas/report_v3.schema.json +0 -16826
  85. package/src/schemas/output_schemas/resolvedTests_v3.schema.json +0 -33331
  86. package/src/schemas/output_schemas/runCode_v2.schema.json +0 -200
  87. package/src/schemas/output_schemas/runCode_v3.schema.json +0 -222
  88. package/src/schemas/output_schemas/runShell_v1.schema.json +0 -35
  89. package/src/schemas/output_schemas/runShell_v2.schema.json +0 -188
  90. package/src/schemas/output_schemas/runShell_v3.schema.json +0 -236
  91. package/src/schemas/output_schemas/saveCookie_v3.schema.json +0 -245
  92. package/src/schemas/output_schemas/saveScreenshot_v2.schema.json +0 -149
  93. package/src/schemas/output_schemas/screenshot_v1.schema.json +0 -48
  94. package/src/schemas/output_schemas/screenshot_v3.schema.json +0 -681
  95. package/src/schemas/output_schemas/scroll_v1.schema.json +0 -50
  96. package/src/schemas/output_schemas/setVariables_v2.schema.json +0 -38
  97. package/src/schemas/output_schemas/sourceIntegration_v3.schema.json +0 -50
  98. package/src/schemas/output_schemas/spec_v2.schema.json +0 -2301
  99. package/src/schemas/output_schemas/spec_v3.schema.json +0 -16630
  100. package/src/schemas/output_schemas/startRecording_v1.schema.json +0 -55
  101. package/src/schemas/output_schemas/startRecording_v2.schema.json +0 -56
  102. package/src/schemas/output_schemas/step_v3.schema.json +0 -7317
  103. package/src/schemas/output_schemas/stopRecord_v3.schema.json +0 -12
  104. package/src/schemas/output_schemas/stopRecording_v1.schema.json +0 -20
  105. package/src/schemas/output_schemas/stopRecording_v2.schema.json +0 -32
  106. package/src/schemas/output_schemas/test_v2.schema.json +0 -1903
  107. package/src/schemas/output_schemas/test_v3.schema.json +0 -15863
  108. package/src/schemas/output_schemas/typeKeys_v2.schema.json +0 -71
  109. package/src/schemas/output_schemas/type_v1.schema.json +0 -62
  110. package/src/schemas/output_schemas/type_v3.schema.json +0 -244
  111. package/src/schemas/output_schemas/wait_v1.schema.json +0 -42
  112. package/src/schemas/output_schemas/wait_v2.schema.json +0 -41
  113. package/src/schemas/output_schemas/wait_v3.schema.json +0 -41
  114. package/src/schemas/schemas.json +0 -121331
  115. package/src/schemas/src_schemas/analytics_v1.schema.json +0 -585
  116. package/src/schemas/src_schemas/checkLink_v1.schema.json +0 -42
  117. package/src/schemas/src_schemas/checkLink_v2.schema.json +0 -65
  118. package/src/schemas/src_schemas/checkLink_v3.schema.json +0 -91
  119. package/src/schemas/src_schemas/click_v1.schema.json +0 -60
  120. package/src/schemas/src_schemas/click_v3.schema.json +0 -144
  121. package/src/schemas/src_schemas/config_v2.schema.json +0 -929
  122. package/src/schemas/src_schemas/config_v3.schema.json +0 -633
  123. package/src/schemas/src_schemas/context_v2.schema.json +0 -108
  124. package/src/schemas/src_schemas/context_v3.schema.json +0 -202
  125. package/src/schemas/src_schemas/dragAndDrop_v3.schema.json +0 -185
  126. package/src/schemas/src_schemas/find_v1.schema.json +0 -137
  127. package/src/schemas/src_schemas/find_v2.schema.json +0 -155
  128. package/src/schemas/src_schemas/find_v3.schema.json +0 -210
  129. package/src/schemas/src_schemas/goTo_v1.schema.json +0 -30
  130. package/src/schemas/src_schemas/goTo_v2.schema.json +0 -58
  131. package/src/schemas/src_schemas/goTo_v3.schema.json +0 -232
  132. package/src/schemas/src_schemas/httpRequest_v1.schema.json +0 -115
  133. package/src/schemas/src_schemas/httpRequest_v2.schema.json +0 -284
  134. package/src/schemas/src_schemas/httpRequest_v3.schema.json +0 -402
  135. package/src/schemas/src_schemas/loadCookie_v3.schema.json +0 -113
  136. package/src/schemas/src_schemas/loadVariables_v3.schema.json +0 -9
  137. package/src/schemas/src_schemas/matchText_v1.schema.json +0 -32
  138. package/src/schemas/src_schemas/moveMouse_v1.schema.json +0 -60
  139. package/src/schemas/src_schemas/moveTo_v2.schema.json +0 -89
  140. package/src/schemas/src_schemas/openApi_v2.schema.json +0 -64
  141. package/src/schemas/src_schemas/openApi_v3.schema.json +0 -161
  142. package/src/schemas/src_schemas/record_v3.schema.json +0 -69
  143. package/src/schemas/src_schemas/report_v3.schema.json +0 -52
  144. package/src/schemas/src_schemas/resolvedTests_v3.schema.json +0 -237
  145. package/src/schemas/src_schemas/runCode_v2.schema.json +0 -181
  146. package/src/schemas/src_schemas/runCode_v3.schema.json +0 -137
  147. package/src/schemas/src_schemas/runShell_v1.schema.json +0 -35
  148. package/src/schemas/src_schemas/runShell_v2.schema.json +0 -166
  149. package/src/schemas/src_schemas/runShell_v3.schema.json +0 -155
  150. package/src/schemas/src_schemas/saveCookie_v3.schema.json +0 -124
  151. package/src/schemas/src_schemas/saveScreenshot_v2.schema.json +0 -129
  152. package/src/schemas/src_schemas/screenshot_v1.schema.json +0 -48
  153. package/src/schemas/src_schemas/screenshot_v3.schema.json +0 -249
  154. package/src/schemas/src_schemas/scroll_v1.schema.json +0 -50
  155. package/src/schemas/src_schemas/setVariables_v2.schema.json +0 -38
  156. package/src/schemas/src_schemas/sourceIntegration_v3.schema.json +0 -45
  157. package/src/schemas/src_schemas/spec_v2.schema.json +0 -175
  158. package/src/schemas/src_schemas/spec_v3.schema.json +0 -212
  159. package/src/schemas/src_schemas/startRecording_v1.schema.json +0 -55
  160. package/src/schemas/src_schemas/startRecording_v2.schema.json +0 -54
  161. package/src/schemas/src_schemas/step_v3.schema.json +0 -632
  162. package/src/schemas/src_schemas/stopRecord_v3.schema.json +0 -9
  163. package/src/schemas/src_schemas/stopRecording_v1.schema.json +0 -20
  164. package/src/schemas/src_schemas/stopRecording_v2.schema.json +0 -32
  165. package/src/schemas/src_schemas/test_v2.schema.json +0 -200
  166. package/src/schemas/src_schemas/test_v3.schema.json +0 -268
  167. package/src/schemas/src_schemas/typeKeys_v2.schema.json +0 -63
  168. package/src/schemas/src_schemas/type_v1.schema.json +0 -62
  169. package/src/schemas/src_schemas/type_v3.schema.json +0 -118
  170. package/src/schemas/src_schemas/wait_v1.schema.json +0 -42
  171. package/src/schemas/src_schemas/wait_v2.schema.json +0 -41
  172. package/src/schemas/src_schemas/wait_v3.schema.json +0 -36
  173. package/src/types/generated/checkLink_v3.ts +0 -29
  174. package/src/types/generated/click_v3.ts +0 -17
  175. package/src/types/generated/config_v3.ts +0 -405
  176. package/src/types/generated/context_v3.ts +0 -112
  177. package/src/types/generated/dragAndDrop_v3.ts +0 -39
  178. package/src/types/generated/endRecord_v3.ts +0 -10
  179. package/src/types/generated/find_v3.ts +0 -17
  180. package/src/types/generated/goTo_v3.ts +0 -48
  181. package/src/types/generated/httpRequest_v3.ts +0 -17
  182. package/src/types/generated/loadCookie_v3.ts +0 -17
  183. package/src/types/generated/loadVariables_v3.ts +0 -10
  184. package/src/types/generated/openApi_v3.ts +0 -64
  185. package/src/types/generated/record_v3.ts +0 -34
  186. package/src/types/generated/report_v3.ts +0 -183
  187. package/src/types/generated/resolvedTests_v3.ts +0 -585
  188. package/src/types/generated/runCode_v3.ts +0 -59
  189. package/src/types/generated/runShell_v3.ts +0 -58
  190. package/src/types/generated/saveCookie_v3.ts +0 -17
  191. package/src/types/generated/screenshot_v3.ts +0 -76
  192. package/src/types/generated/sourceIntegration_v3.ts +0 -31
  193. package/src/types/generated/spec_v3.ts +0 -166
  194. package/src/types/generated/step_v3.ts +0 -1288
  195. package/src/types/generated/stopRecord_v3.ts +0 -10
  196. package/src/types/generated/test_v3.ts +0 -3048
  197. package/src/types/generated/type_v3.ts +0 -56
  198. package/src/types/generated/wait_v3.ts +0 -13
  199. package/src/validate.ts +0 -627
  200. package/tsconfig.json +0 -22
@@ -1,994 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "httpRequest",
4
- "description": "Perform a generic HTTP request, for example to an API.",
5
- "anyOf": [
6
- {
7
- "title": "HTTP request (simple)",
8
- "type": "string",
9
- "description": "URL for the HTTP request.",
10
- "pattern": "(^(http://|https://).*|\\$[A-Za-z0-9_]+)",
11
- "transform": [
12
- "trim"
13
- ]
14
- },
15
- {
16
- "title": "HTTP request (detailed)",
17
- "type": "object",
18
- "anyOf": [
19
- {
20
- "required": [
21
- "url"
22
- ]
23
- },
24
- {
25
- "required": [
26
- "openApi"
27
- ]
28
- }
29
- ],
30
- "additionalProperties": false,
31
- "properties": {
32
- "url": {
33
- "title": "HTTP request (simple)",
34
- "type": "string",
35
- "description": "URL for the HTTP request.",
36
- "pattern": "(^(http://|https://).*|\\$[A-Za-z0-9_]+)",
37
- "transform": [
38
- "trim"
39
- ]
40
- },
41
- "openApi": {
42
- "anyOf": [
43
- {
44
- "allOf": [
45
- {
46
- "type": "string",
47
- "description": "ID of the operation to use for the request."
48
- },
49
- {
50
- "title": "Operation ID",
51
- "description": "Operation ID from the OpenAPI schema. Only valid if the OpenAPI description path is specified elsewhere and the operation ID is unique among all specified OpenAPI descriptions."
52
- }
53
- ]
54
- },
55
- {
56
- "allOf": [
57
- {
58
- "version": "1.0.0",
59
- "$schema": "http://json-schema.org/draft-07/schema#",
60
- "title": "openApi",
61
- "type": "object",
62
- "description": "OpenAPI description and configuration.",
63
- "additionalProperties": false,
64
- "anyOf": [
65
- {
66
- "required": [
67
- "descriptionPath"
68
- ]
69
- },
70
- {
71
- "required": [
72
- "operationId"
73
- ]
74
- }
75
- ],
76
- "properties": {
77
- "name": {
78
- "type": "string",
79
- "description": "Name of the OpenAPI description, as defined in your configuration."
80
- },
81
- "descriptionPath": {
82
- "type": "string",
83
- "description": "URL or local path to the OpenAPI description."
84
- },
85
- "definition": {
86
- "type": "object",
87
- "readOnly": true,
88
- "description": "OpenAPI definition object loaded from the `descriptionPath`. This is a resolved version of the OpenAPI description and should not be user-defined.",
89
- "additionalProperties": true,
90
- "title": "OpenAPI definition"
91
- },
92
- "operationId": {
93
- "type": "string",
94
- "description": "ID of the operation to use for the request."
95
- },
96
- "server": {
97
- "type": "string",
98
- "description": "Server to use for example requests. Only valid if `useExample` is `request` or `both`. If not specified but an example is used for the request, uses the first server defined in the OpenAPI description."
99
- },
100
- "validateAgainstSchema": {
101
- "type": "string",
102
- "description": "Validates the request and/or response against the schema in the OpenAPI description. If the request or response doesn't match the schema, the step fails.",
103
- "enum": [
104
- "request",
105
- "response",
106
- "both",
107
- "none"
108
- ],
109
- "default": "both"
110
- },
111
- "mockResponse": {
112
- "type": "boolean",
113
- "description": "If `true`, doesn't make the HTTP request, but instead uses the response example or schema from the OpenAPI description as the response data. Useful for creating tests when an API isn't fully implemented yet. If `statusCode` isn't specified, uses the first defined response code."
114
- },
115
- "statusCode": {
116
- "type": "integer",
117
- "description": "Response code to use for validation, examples, and status code checking. If the response code doesn't match, the step fails. `statusCodes` overrides this value when specified."
118
- },
119
- "useExample": {
120
- "type": [
121
- "string"
122
- ],
123
- "description": "Uses the example from the OpenAPI description as the request and response data. If the request or response has multiple examples, specify `exampleKey`. If `statusCode` isn't specified, uses the first defined response code. `requestData`, `requestParams`, and `requestHeaders` override portions of request examples when specified. `responseData` overrides portions of response examples when specified.",
124
- "enum": [
125
- "request",
126
- "response",
127
- "both",
128
- "none"
129
- ],
130
- "default": "none"
131
- },
132
- "exampleKey": {
133
- "type": "string",
134
- "description": "Key of the example to use from the `examples` property in the OpenAPI description. If an `examples` key isn't specified or isn't available for a given parameter or object, the `example` property value is used.",
135
- "default": ""
136
- },
137
- "headers": {
138
- "type": "object",
139
- "description": "Request headers to add to requests. For example, to set `Authorization` headers for all requests from the specified OpenAPI document. If specified in both a config and a step, the step value overrides the config value.",
140
- "additionalProperties": {
141
- "type": "string"
142
- },
143
- "title": "OpenAPI request headers"
144
- }
145
- },
146
- "components": {
147
- "schemas": {
148
- "operationId": {
149
- "type": "string",
150
- "description": "ID of the operation to use for the request."
151
- },
152
- "descriptionPath": {
153
- "type": "string",
154
- "description": "URL or local path to the OpenAPI description."
155
- }
156
- }
157
- },
158
- "examples": [
159
- {
160
- "descriptionPath": "https://petstore.swagger.io/v2/swagger.json"
161
- },
162
- {
163
- "name": "Reqres",
164
- "operationId": "getUserById"
165
- },
166
- {
167
- "descriptionPath": "https://api.example.com/openapi.json",
168
- "operationId": "getUserById"
169
- },
170
- {
171
- "descriptionPath": "https://api.example.com/openapi.json",
172
- "operationId": "createUser",
173
- "useExample": "both"
174
- },
175
- {
176
- "descriptionPath": "https://api.example.com/openapi.json",
177
- "operationId": "createUser",
178
- "useExample": "both",
179
- "exampleKey": "example1"
180
- },
181
- {
182
- "descriptionPath": "https://api.example.com/openapi.json",
183
- "operationId": "createUser",
184
- "useExample": "both",
185
- "exampleKey": "example1",
186
- "statusCode": 201
187
- },
188
- {
189
- "descriptionPath": "https://api.example.com/openapi.json",
190
- "operationId": "createUser",
191
- "useExample": "both",
192
- "exampleKey": "example1",
193
- "statusCode": 201,
194
- "validateAgainstSchema": "none"
195
- },
196
- {
197
- "descriptionPath": "https://api.example.com/openapi.json",
198
- "operationId": "createUser",
199
- "useExample": "both",
200
- "exampleKey": "example1",
201
- "statusCode": 201,
202
- "validateAgainstSchema": "none",
203
- "mockResponse": true
204
- },
205
- {
206
- "descriptionPath": "https://api.example.com/openapi.json",
207
- "operationId": "createUser",
208
- "useExample": "both",
209
- "exampleKey": "example1",
210
- "statusCode": 201,
211
- "validateAgainstSchema": "none",
212
- "mockResponse": true,
213
- "headers": {
214
- "Authorization": "Bearer 12345"
215
- }
216
- }
217
- ]
218
- },
219
- {
220
- "type": "object",
221
- "required": [
222
- "operationId"
223
- ],
224
- "title": "OpenAPI definition (httpRequest)"
225
- }
226
- ]
227
- }
228
- ]
229
- },
230
- "statusCodes": {
231
- "description": "Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails.",
232
- "type": "array",
233
- "items": {
234
- "anyOf": [
235
- {
236
- "type": "integer"
237
- }
238
- ]
239
- },
240
- "default": [
241
- 200,
242
- 201
243
- ]
244
- },
245
- "method": {
246
- "type": "string",
247
- "description": "Method of the HTTP request",
248
- "enum": [
249
- "get",
250
- "put",
251
- "post",
252
- "patch",
253
- "delete"
254
- ],
255
- "transform": [
256
- "trim",
257
- "toEnumCase"
258
- ],
259
- "default": "get"
260
- },
261
- "timeout": {
262
- "type": "integer",
263
- "description": "Timeout for the HTTP request, in milliseconds.",
264
- "default": 60000
265
- },
266
- "request": {
267
- "type": "object",
268
- "additionalProperties": false,
269
- "properties": {
270
- "headers": {
271
- "description": "Headers to include in the HTTP request.",
272
- "default": {},
273
- "anyOf": [
274
- {
275
- "title": "Request headers (object)",
276
- "description": "Headers to include in the HTTP request, in key/value format.",
277
- "type": "object",
278
- "additionalProperties": true,
279
- "properties": {}
280
- },
281
- {
282
- "title": "Request headers (string)",
283
- "description": "Headers to include in the HTTP request, as return-separated values. For example, `Content-Type: application/json\nAuthorization: Bearer token`.",
284
- "type": "string"
285
- }
286
- ]
287
- },
288
- "parameters": {
289
- "description": "URL parameters to include in the HTTP request, in key/value format.",
290
- "type": "object",
291
- "additionalProperties": true,
292
- "default": {},
293
- "properties": {},
294
- "title": "Request parameters"
295
- },
296
- "body": {
297
- "description": "The body of the HTTP request.",
298
- "anyOf": [
299
- {
300
- "title": "Request body (object)",
301
- "description": "JSON object to include as the body of the HTTP request.",
302
- "type": "object",
303
- "additionalProperties": true,
304
- "properties": {}
305
- },
306
- {
307
- "title": "Request body (array)",
308
- "description": "JSON array to include as the body of the HTTP request.",
309
- "type": "array",
310
- "items": {}
311
- },
312
- {
313
- "title": "Request body (string)",
314
- "description": "String to include as the body of the HTTP request.",
315
- "type": "string"
316
- }
317
- ],
318
- "default": {}
319
- }
320
- },
321
- "title": "Request"
322
- },
323
- "response": {
324
- "type": "object",
325
- "additionalProperties": false,
326
- "properties": {
327
- "headers": {
328
- "description": "Headers expected in the response, in key/value format. If one or more `responseHeaders` entries aren't present in the response, the step fails.",
329
- "type": "object",
330
- "additionalProperties": true,
331
- "properties": {},
332
- "default": {},
333
- "title": "Response headers"
334
- },
335
- "body": {
336
- "description": "JSON object expected in the response. If one or more key/value pairs aren't present in the response, the step fails.",
337
- "anyOf": [
338
- {
339
- "type": "object",
340
- "additionalProperties": true,
341
- "properties": {},
342
- "title": "Response body object",
343
- "description": "JSON key/value pairs expected in the response."
344
- },
345
- {
346
- "title": "Response body array",
347
- "description": "JSON array expected in the response.",
348
- "type": "array",
349
- "items": {}
350
- },
351
- {
352
- "title": "Response body string",
353
- "description": "String expected in the response.",
354
- "type": "string"
355
- }
356
- ],
357
- "default": {}
358
- },
359
- "required": {
360
- "type": "array",
361
- "description": "Array of field paths that must exist in the response body. Uses dot notation for nested fields (e.g., 'user.name') and bracket notation for array indices (e.g., 'items[0].id'). Fields must be present but may have any value including null.",
362
- "items": {
363
- "type": "string"
364
- },
365
- "default": []
366
- }
367
- },
368
- "title": "Response"
369
- },
370
- "allowAdditionalFields": {
371
- "type": "boolean",
372
- "description": "If `false`, the step fails when the response data contains fields not specified in the response body.",
373
- "default": true
374
- },
375
- "path": {
376
- "type": "string",
377
- "description": "File path to save the command's output, relative to `directory`. Specify a file extension that matches the expected response type, such as `.json` for JSON content or `.txt` for strings."
378
- },
379
- "directory": {
380
- "type": "string",
381
- "description": "Directory to save the command's output. If the directory doesn't exist, creates the directory. If not specified, the directory is your media directory."
382
- },
383
- "maxVariation": {
384
- "type": "number",
385
- "description": "Allowed variation in percentage of text different between the current output and previously saved output. If the difference between the current output and the previous output is greater than `maxVariation`, the step fails. If output doesn't exist at `path`, this value is ignored.",
386
- "default": 0,
387
- "minimum": 0,
388
- "maximum": 1
389
- },
390
- "overwrite": {
391
- "type": "string",
392
- "description": "If `true`, overwrites the existing output at `path` if it exists.\nIf `aboveVariation`, overwrites the existing output at `path` if the difference between the new output and the existing output is greater than `maxVariation`.",
393
- "enum": [
394
- "true",
395
- "false",
396
- "aboveVariation"
397
- ],
398
- "default": "aboveVariation"
399
- }
400
- }
401
- }
402
- ],
403
- "components": {
404
- "schemas": {
405
- "url": {
406
- "title": "HTTP request (simple)",
407
- "type": "string",
408
- "description": "URL for the HTTP request.",
409
- "pattern": "(^(http://|https://).*|\\$[A-Za-z0-9_]+)",
410
- "transform": [
411
- "trim"
412
- ]
413
- },
414
- "object": {
415
- "title": "HTTP request (detailed)",
416
- "type": "object",
417
- "anyOf": [
418
- {
419
- "required": [
420
- "url"
421
- ]
422
- },
423
- {
424
- "required": [
425
- "openApi"
426
- ]
427
- }
428
- ],
429
- "additionalProperties": false,
430
- "properties": {
431
- "url": {
432
- "title": "HTTP request (simple)",
433
- "type": "string",
434
- "description": "URL for the HTTP request.",
435
- "pattern": "(^(http://|https://).*|\\$[A-Za-z0-9_]+)",
436
- "transform": [
437
- "trim"
438
- ]
439
- },
440
- "openApi": {
441
- "anyOf": [
442
- {
443
- "allOf": [
444
- {
445
- "type": "string",
446
- "description": "ID of the operation to use for the request."
447
- },
448
- {
449
- "title": "Operation ID",
450
- "description": "Operation ID from the OpenAPI schema. Only valid if the OpenAPI description path is specified elsewhere and the operation ID is unique among all specified OpenAPI descriptions."
451
- }
452
- ]
453
- },
454
- {
455
- "allOf": [
456
- {
457
- "version": "1.0.0",
458
- "$schema": "http://json-schema.org/draft-07/schema#",
459
- "title": "openApi",
460
- "type": "object",
461
- "description": "OpenAPI description and configuration.",
462
- "additionalProperties": false,
463
- "anyOf": [
464
- {
465
- "required": [
466
- "descriptionPath"
467
- ]
468
- },
469
- {
470
- "required": [
471
- "operationId"
472
- ]
473
- }
474
- ],
475
- "properties": {
476
- "name": {
477
- "type": "string",
478
- "description": "Name of the OpenAPI description, as defined in your configuration."
479
- },
480
- "descriptionPath": {
481
- "type": "string",
482
- "description": "URL or local path to the OpenAPI description."
483
- },
484
- "definition": {
485
- "type": "object",
486
- "readOnly": true,
487
- "description": "OpenAPI definition object loaded from the `descriptionPath`. This is a resolved version of the OpenAPI description and should not be user-defined.",
488
- "additionalProperties": true,
489
- "title": "OpenAPI definition"
490
- },
491
- "operationId": {
492
- "type": "string",
493
- "description": "ID of the operation to use for the request."
494
- },
495
- "server": {
496
- "type": "string",
497
- "description": "Server to use for example requests. Only valid if `useExample` is `request` or `both`. If not specified but an example is used for the request, uses the first server defined in the OpenAPI description."
498
- },
499
- "validateAgainstSchema": {
500
- "type": "string",
501
- "description": "Validates the request and/or response against the schema in the OpenAPI description. If the request or response doesn't match the schema, the step fails.",
502
- "enum": [
503
- "request",
504
- "response",
505
- "both",
506
- "none"
507
- ],
508
- "default": "both"
509
- },
510
- "mockResponse": {
511
- "type": "boolean",
512
- "description": "If `true`, doesn't make the HTTP request, but instead uses the response example or schema from the OpenAPI description as the response data. Useful for creating tests when an API isn't fully implemented yet. If `statusCode` isn't specified, uses the first defined response code."
513
- },
514
- "statusCode": {
515
- "type": "integer",
516
- "description": "Response code to use for validation, examples, and status code checking. If the response code doesn't match, the step fails. `statusCodes` overrides this value when specified."
517
- },
518
- "useExample": {
519
- "type": [
520
- "string"
521
- ],
522
- "description": "Uses the example from the OpenAPI description as the request and response data. If the request or response has multiple examples, specify `exampleKey`. If `statusCode` isn't specified, uses the first defined response code. `requestData`, `requestParams`, and `requestHeaders` override portions of request examples when specified. `responseData` overrides portions of response examples when specified.",
523
- "enum": [
524
- "request",
525
- "response",
526
- "both",
527
- "none"
528
- ],
529
- "default": "none"
530
- },
531
- "exampleKey": {
532
- "type": "string",
533
- "description": "Key of the example to use from the `examples` property in the OpenAPI description. If an `examples` key isn't specified or isn't available for a given parameter or object, the `example` property value is used.",
534
- "default": ""
535
- },
536
- "headers": {
537
- "type": "object",
538
- "description": "Request headers to add to requests. For example, to set `Authorization` headers for all requests from the specified OpenAPI document. If specified in both a config and a step, the step value overrides the config value.",
539
- "additionalProperties": {
540
- "type": "string"
541
- },
542
- "title": "OpenAPI request headers"
543
- }
544
- },
545
- "components": {
546
- "schemas": {
547
- "operationId": {
548
- "type": "string",
549
- "description": "ID of the operation to use for the request."
550
- },
551
- "descriptionPath": {
552
- "type": "string",
553
- "description": "URL or local path to the OpenAPI description."
554
- }
555
- }
556
- },
557
- "examples": [
558
- {
559
- "descriptionPath": "https://petstore.swagger.io/v2/swagger.json"
560
- },
561
- {
562
- "name": "Reqres",
563
- "operationId": "getUserById"
564
- },
565
- {
566
- "descriptionPath": "https://api.example.com/openapi.json",
567
- "operationId": "getUserById"
568
- },
569
- {
570
- "descriptionPath": "https://api.example.com/openapi.json",
571
- "operationId": "createUser",
572
- "useExample": "both"
573
- },
574
- {
575
- "descriptionPath": "https://api.example.com/openapi.json",
576
- "operationId": "createUser",
577
- "useExample": "both",
578
- "exampleKey": "example1"
579
- },
580
- {
581
- "descriptionPath": "https://api.example.com/openapi.json",
582
- "operationId": "createUser",
583
- "useExample": "both",
584
- "exampleKey": "example1",
585
- "statusCode": 201
586
- },
587
- {
588
- "descriptionPath": "https://api.example.com/openapi.json",
589
- "operationId": "createUser",
590
- "useExample": "both",
591
- "exampleKey": "example1",
592
- "statusCode": 201,
593
- "validateAgainstSchema": "none"
594
- },
595
- {
596
- "descriptionPath": "https://api.example.com/openapi.json",
597
- "operationId": "createUser",
598
- "useExample": "both",
599
- "exampleKey": "example1",
600
- "statusCode": 201,
601
- "validateAgainstSchema": "none",
602
- "mockResponse": true
603
- },
604
- {
605
- "descriptionPath": "https://api.example.com/openapi.json",
606
- "operationId": "createUser",
607
- "useExample": "both",
608
- "exampleKey": "example1",
609
- "statusCode": 201,
610
- "validateAgainstSchema": "none",
611
- "mockResponse": true,
612
- "headers": {
613
- "Authorization": "Bearer 12345"
614
- }
615
- }
616
- ]
617
- },
618
- {
619
- "type": "object",
620
- "required": [
621
- "operationId"
622
- ],
623
- "title": "OpenAPI definition (httpRequest)"
624
- }
625
- ]
626
- }
627
- ]
628
- },
629
- "statusCodes": {
630
- "description": "Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails.",
631
- "type": "array",
632
- "items": {
633
- "anyOf": [
634
- {
635
- "type": "integer"
636
- }
637
- ]
638
- },
639
- "default": [
640
- 200,
641
- 201
642
- ]
643
- },
644
- "method": {
645
- "type": "string",
646
- "description": "Method of the HTTP request",
647
- "enum": [
648
- "get",
649
- "put",
650
- "post",
651
- "patch",
652
- "delete"
653
- ],
654
- "transform": [
655
- "trim",
656
- "toEnumCase"
657
- ],
658
- "default": "get"
659
- },
660
- "timeout": {
661
- "type": "integer",
662
- "description": "Timeout for the HTTP request, in milliseconds.",
663
- "default": 60000
664
- },
665
- "request": {
666
- "type": "object",
667
- "additionalProperties": false,
668
- "properties": {
669
- "headers": {
670
- "description": "Headers to include in the HTTP request.",
671
- "default": {},
672
- "anyOf": [
673
- {
674
- "title": "Request headers (object)",
675
- "description": "Headers to include in the HTTP request, in key/value format.",
676
- "type": "object",
677
- "additionalProperties": true,
678
- "properties": {}
679
- },
680
- {
681
- "title": "Request headers (string)",
682
- "description": "Headers to include in the HTTP request, as return-separated values. For example, `Content-Type: application/json\nAuthorization: Bearer token`.",
683
- "type": "string"
684
- }
685
- ]
686
- },
687
- "parameters": {
688
- "description": "URL parameters to include in the HTTP request, in key/value format.",
689
- "type": "object",
690
- "additionalProperties": true,
691
- "default": {},
692
- "properties": {},
693
- "title": "Request parameters"
694
- },
695
- "body": {
696
- "description": "The body of the HTTP request.",
697
- "anyOf": [
698
- {
699
- "title": "Request body (object)",
700
- "description": "JSON object to include as the body of the HTTP request.",
701
- "type": "object",
702
- "additionalProperties": true,
703
- "properties": {}
704
- },
705
- {
706
- "title": "Request body (array)",
707
- "description": "JSON array to include as the body of the HTTP request.",
708
- "type": "array",
709
- "items": {}
710
- },
711
- {
712
- "title": "Request body (string)",
713
- "description": "String to include as the body of the HTTP request.",
714
- "type": "string"
715
- }
716
- ],
717
- "default": {}
718
- }
719
- },
720
- "title": "Request"
721
- },
722
- "response": {
723
- "type": "object",
724
- "additionalProperties": false,
725
- "properties": {
726
- "headers": {
727
- "description": "Headers expected in the response, in key/value format. If one or more `responseHeaders` entries aren't present in the response, the step fails.",
728
- "type": "object",
729
- "additionalProperties": true,
730
- "properties": {},
731
- "default": {},
732
- "title": "Response headers"
733
- },
734
- "body": {
735
- "description": "JSON object expected in the response. If one or more key/value pairs aren't present in the response, the step fails.",
736
- "anyOf": [
737
- {
738
- "type": "object",
739
- "additionalProperties": true,
740
- "properties": {},
741
- "title": "Response body object",
742
- "description": "JSON key/value pairs expected in the response."
743
- },
744
- {
745
- "title": "Response body array",
746
- "description": "JSON array expected in the response.",
747
- "type": "array",
748
- "items": {}
749
- },
750
- {
751
- "title": "Response body string",
752
- "description": "String expected in the response.",
753
- "type": "string"
754
- }
755
- ],
756
- "default": {}
757
- },
758
- "required": {
759
- "type": "array",
760
- "description": "Array of field paths that must exist in the response body. Uses dot notation for nested fields (e.g., 'user.name') and bracket notation for array indices (e.g., 'items[0].id'). Fields must be present but may have any value including null.",
761
- "items": {
762
- "type": "string"
763
- },
764
- "default": []
765
- }
766
- },
767
- "title": "Response"
768
- },
769
- "allowAdditionalFields": {
770
- "type": "boolean",
771
- "description": "If `false`, the step fails when the response data contains fields not specified in the response body.",
772
- "default": true
773
- },
774
- "path": {
775
- "type": "string",
776
- "description": "File path to save the command's output, relative to `directory`. Specify a file extension that matches the expected response type, such as `.json` for JSON content or `.txt` for strings."
777
- },
778
- "directory": {
779
- "type": "string",
780
- "description": "Directory to save the command's output. If the directory doesn't exist, creates the directory. If not specified, the directory is your media directory."
781
- },
782
- "maxVariation": {
783
- "type": "number",
784
- "description": "Allowed variation in percentage of text different between the current output and previously saved output. If the difference between the current output and the previous output is greater than `maxVariation`, the step fails. If output doesn't exist at `path`, this value is ignored.",
785
- "default": 0,
786
- "minimum": 0,
787
- "maximum": 1
788
- },
789
- "overwrite": {
790
- "type": "string",
791
- "description": "If `true`, overwrites the existing output at `path` if it exists.\nIf `aboveVariation`, overwrites the existing output at `path` if the difference between the new output and the existing output is greater than `maxVariation`.",
792
- "enum": [
793
- "true",
794
- "false",
795
- "aboveVariation"
796
- ],
797
- "default": "aboveVariation"
798
- }
799
- }
800
- }
801
- }
802
- },
803
- "examples": [
804
- "https://reqres.in/api/users",
805
- {
806
- "url": "https://reqres.in/api/users"
807
- },
808
- {
809
- "url": "https://reqres.in/api/users/2",
810
- "method": "put",
811
- "request": {
812
- "body": {
813
- "name": "morpheus",
814
- "job": "zion resident"
815
- }
816
- }
817
- },
818
- {
819
- "url": "https://reqres.in/api/users",
820
- "method": "post",
821
- "request": {
822
- "body": {
823
- "name": "morpheus",
824
- "job": "leader"
825
- }
826
- },
827
- "response": {
828
- "body": {
829
- "name": "morpheus",
830
- "job": "leader"
831
- }
832
- },
833
- "statusCodes": [
834
- 200,
835
- 201
836
- ]
837
- },
838
- {
839
- "url": "https://www.api-server.com",
840
- "method": "post",
841
- "timeout": 30000,
842
- "request": {
843
- "body": {
844
- "field": "value"
845
- },
846
- "headers": {
847
- "header": "value"
848
- },
849
- "parameters": {
850
- "param": "value"
851
- }
852
- },
853
- "response": {
854
- "body": {
855
- "field": "value"
856
- },
857
- "headers": {
858
- "header": "value"
859
- }
860
- },
861
- "statusCodes": [
862
- 200
863
- ]
864
- },
865
- {
866
- "url": "https://reqres.in/api/users",
867
- "method": "post",
868
- "request": {
869
- "body": {
870
- "name": "morpheus",
871
- "job": "leader"
872
- }
873
- },
874
- "response": {
875
- "body": {
876
- "name": "morpheus",
877
- "job": "leader"
878
- }
879
- },
880
- "statusCodes": [
881
- 200,
882
- 201
883
- ],
884
- "path": "response.json",
885
- "directory": "media",
886
- "maxVariation": 0.05,
887
- "overwrite": "aboveVariation"
888
- },
889
- {
890
- "openApi": "getUserById"
891
- },
892
- {
893
- "openApi": {
894
- "name": "Reqres",
895
- "operationId": "getUserById"
896
- },
897
- "request": {
898
- "parameters": {
899
- "id": 123
900
- }
901
- }
902
- },
903
- {
904
- "openApi": {
905
- "descriptionPath": "https://api.example.com/openapi.json",
906
- "operationId": "getUserById"
907
- },
908
- "request": {
909
- "parameters": {
910
- "id": 123
911
- }
912
- }
913
- },
914
- {
915
- "openApi": {
916
- "descriptionPath": "https://api.example.com/openapi.json",
917
- "operationId": "createUser",
918
- "useExample": "both"
919
- }
920
- },
921
- {
922
- "openApi": {
923
- "descriptionPath": "https://api.example.com/openapi.json",
924
- "operationId": "updateUser",
925
- "useExample": "request",
926
- "exampleKey": "acme"
927
- }
928
- },
929
- {
930
- "openApi": {
931
- "descriptionPath": "https://api.example.com/openapi.json",
932
- "operationId": "updateUser",
933
- "useExample": "request",
934
- "exampleKey": "acme",
935
- "headers": {
936
- "Authorization": "Bearer $TOKEN"
937
- }
938
- }
939
- },
940
- {
941
- "url": "https://www.api-server.com",
942
- "method": "post",
943
- "request": {
944
- "headers": "Content-Type: application/json\\nAuthorization: Bearer token"
945
- }
946
- },
947
- {
948
- "url": "https://api.example.com/users/123",
949
- "response": {
950
- "required": [
951
- "id",
952
- "email",
953
- "createdAt"
954
- ]
955
- }
956
- },
957
- {
958
- "url": "https://api.example.com/users/123",
959
- "response": {
960
- "required": [
961
- "user.profile.name",
962
- "user.profile.avatar",
963
- "user.settings.notifications"
964
- ]
965
- }
966
- },
967
- {
968
- "url": "https://api.example.com/orders",
969
- "response": {
970
- "required": [
971
- "orders[0].id",
972
- "orders[0].total",
973
- "orders[0].items[0].productId"
974
- ]
975
- }
976
- },
977
- {
978
- "url": "https://api.example.com/users",
979
- "response": {
980
- "required": [
981
- "sessionToken",
982
- "expiresAt",
983
- "user.id"
984
- ],
985
- "body": {
986
- "status": "success",
987
- "user": {
988
- "role": "admin"
989
- }
990
- }
991
- }
992
- }
993
- ]
994
- }