doc-detective-common 4.0.0-beta.0-dev.7 → 4.0.0-beta.0-dev.8

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 (45) hide show
  1. package/dist/detectTests.d.ts +17 -22
  2. package/dist/detectTests.d.ts.map +1 -1
  3. package/dist/detectTests.js +81 -4
  4. package/dist/detectTests.js.map +1 -1
  5. package/dist/fileTypes.d.ts +35 -0
  6. package/dist/fileTypes.d.ts.map +1 -0
  7. package/dist/fileTypes.js +293 -0
  8. package/dist/fileTypes.js.map +1 -0
  9. package/dist/index.cjs +7288 -162
  10. package/dist/index.d.cts +2 -1
  11. package/dist/index.d.ts +2 -1
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +1 -0
  14. package/dist/index.js.map +1 -1
  15. package/dist/schemas/schemas.json +6786 -0
  16. package/dist/types/generated/step_v3.d.ts +288 -0
  17. package/dist/types/generated/step_v3.d.ts.map +1 -1
  18. package/dist/types/generated/test_v3.d.ts +576 -0
  19. package/dist/types/generated/test_v3.d.ts.map +1 -1
  20. package/package.json +4 -3
  21. package/dist/schemas/checkLink_v3.schema.json +0 -145
  22. package/dist/schemas/click_v3.schema.json +0 -252
  23. package/dist/schemas/config_v3.schema.json +0 -16470
  24. package/dist/schemas/context_v3.schema.json +0 -374
  25. package/dist/schemas/dragAndDrop_v3.schema.json +0 -496
  26. package/dist/schemas/find_v3.schema.json +0 -1349
  27. package/dist/schemas/goTo_v3.schema.json +0 -419
  28. package/dist/schemas/httpRequest_v3.schema.json +0 -994
  29. package/dist/schemas/loadCookie_v3.schema.json +0 -228
  30. package/dist/schemas/loadVariables_v3.schema.json +0 -9
  31. package/dist/schemas/openApi_v3.schema.json +0 -162
  32. package/dist/schemas/record_v3.schema.json +0 -101
  33. package/dist/schemas/report_v3.schema.json +0 -16826
  34. package/dist/schemas/resolvedTests_v3.schema.json +0 -33331
  35. package/dist/schemas/runCode_v3.schema.json +0 -222
  36. package/dist/schemas/runShell_v3.schema.json +0 -236
  37. package/dist/schemas/saveCookie_v3.schema.json +0 -245
  38. package/dist/schemas/screenshot_v3.schema.json +0 -681
  39. package/dist/schemas/sourceIntegration_v3.schema.json +0 -50
  40. package/dist/schemas/spec_v3.schema.json +0 -16630
  41. package/dist/schemas/step_v3.schema.json +0 -7317
  42. package/dist/schemas/stopRecord_v3.schema.json +0 -12
  43. package/dist/schemas/test_v3.schema.json +0 -15863
  44. package/dist/schemas/type_v3.schema.json +0 -244
  45. package/dist/schemas/wait_v3.schema.json +0 -41
@@ -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
- }