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,257 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "goTo",
4
- "anyOf": [
5
- {
6
- "$ref": "#/components/schemas/string"
7
- },
8
- {
9
- "$ref": "#/components/schemas/object"
10
- }
11
- ],
12
- "components": {
13
- "schemas": {
14
- "string": {
15
- "title": "Go to URL (simple)",
16
- "description": "Navigate to an HTTP or HTTPS URL. Can be a full URL or a path. If a path is provided, navigates relative to the current URL, if any.",
17
- "type": "string",
18
- "pattern": "(^(http://|https://|/).*|\\$[A-Za-z0-9_]+)",
19
- "transform": [
20
- "trim"
21
- ]
22
- },
23
- "object": {
24
- "description": "Navigate to an HTTP or HTTPS URL.",
25
- "type": "object",
26
- "additionalProperties": false,
27
- "required": [
28
- "url"
29
- ],
30
- "properties": {
31
- "url": {
32
- "type": "string",
33
- "description": "URL to navigate to. Can be a full URL or a path. If a path is provided and `origin` is specified, prepends `origin` to `url`. If a path is provided but `origin` isn't specified, attempts to navigate relative to the current URL, if any.",
34
- "pattern": "(^(http://|https://|/).*|\\$[A-Za-z0-9_]+)",
35
- "transform": [
36
- "trim"
37
- ]
38
- },
39
- "origin": {
40
- "type": "string",
41
- "description": "Protocol and domain to navigate to. Prepended to `url`.",
42
- "transform": [
43
- "trim"
44
- ]
45
- },
46
- "timeout": {
47
- "type": "integer",
48
- "description": "Maximum time in milliseconds to wait for the page to be ready. If exceeded, the goTo action fails.",
49
- "default": 30000,
50
- "minimum": 0
51
- },
52
- "waitUntil": {
53
- "type": "object",
54
- "description": "Configuration for waiting conditions after navigation.",
55
- "additionalProperties": false,
56
- "properties": {
57
- "networkIdleTime": {
58
- "description": "Wait for network activity to be idle (no new requests) for this duration in milliseconds. Set to `null` to skip this check.",
59
- "anyOf": [
60
- {
61
- "type": "integer",
62
- "minimum": 0
63
- },
64
- {
65
- "type": "null"
66
- }
67
- ],
68
- "default": 500
69
- },
70
- "domIdleTime": {
71
- "description": "Wait for DOM mutations to stop for this duration in milliseconds. Set to `null` to skip this check.",
72
- "anyOf": [
73
- {
74
- "type": "integer",
75
- "minimum": 0
76
- },
77
- {
78
- "type": "null"
79
- }
80
- ],
81
- "default": 1000
82
- },
83
- "find": {
84
- "type": "object",
85
- "description": "Wait for a specific element to be present in the DOM. At least one of selector or elementText must be specified.",
86
- "additionalProperties": false,
87
- "anyOf": [
88
- {
89
- "required": [
90
- "selector"
91
- ]
92
- },
93
- {
94
- "required": [
95
- "elementText"
96
- ]
97
- },
98
- {
99
- "required": [
100
- "elementId"
101
- ]
102
- },
103
- {
104
- "required": [
105
- "elementTestId"
106
- ]
107
- },
108
- {
109
- "required": [
110
- "elementClass"
111
- ]
112
- },
113
- {
114
- "required": [
115
- "elementAttribute"
116
- ]
117
- },
118
- {
119
- "required": [
120
- "elementAria"
121
- ]
122
- }
123
- ],
124
- "properties": {
125
- "selector": {
126
- "type": "string",
127
- "description": "CSS selector for the element to wait for."
128
- },
129
- "elementText": {
130
- "type": "string",
131
- "description": "Text content the element must contain. Supports exact match or regex pattern using /pattern/ syntax."
132
- },
133
- "elementId": {
134
- "type": "string",
135
- "description": "ID attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax."
136
- },
137
- "elementTestId": {
138
- "type": "string",
139
- "description": "data-testid attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax."
140
- },
141
- "elementClass": {
142
- "anyOf": [
143
- {
144
- "type": "string"
145
- },
146
- {
147
- "type": "array",
148
- "items": {
149
- "type": "string"
150
- }
151
- }
152
- ],
153
- "description": "Class or array of classes that the element must have. Each class supports exact match or regex pattern using /pattern/ syntax. Element must have all specified classes."
154
- },
155
- "elementAttribute": {
156
- "type": "object",
157
- "description": "Object of attribute key-value pairs that the element must have. Values can be strings (supporting /pattern/ regex), numbers, or booleans. Boolean true matches attribute presence, false matches absence.",
158
- "additionalProperties": {
159
- "anyOf": [
160
- {
161
- "type": "string"
162
- },
163
- {
164
- "type": "number"
165
- },
166
- {
167
- "type": "boolean"
168
- }
169
- ]
170
- }
171
- },
172
- "elementAria": {
173
- "type": "string",
174
- "description": "Computed accessible name of the element per ARIA specification. Supports exact match or regex pattern using /pattern/ syntax."
175
- }
176
- }
177
- }
178
- }
179
- }
180
- },
181
- "title": "Go to URL (detailed)"
182
- }
183
- }
184
- },
185
- "examples": [
186
- "https://www.google.com",
187
- "/search",
188
- {
189
- "url": "https://www.google.com"
190
- },
191
- {
192
- "url": "/search",
193
- "origin": "https://www.google.com"
194
- },
195
- {
196
- "url": "https://www.example.com",
197
- "waitUntil": {
198
- "networkIdleTime": 500
199
- }
200
- },
201
- {
202
- "url": "https://www.example.com/dashboard",
203
- "waitUntil": {
204
- "find": {
205
- "selector": "[data-testid='dashboard-loaded']"
206
- }
207
- }
208
- },
209
- {
210
- "url": "https://www.example.com/app",
211
- "timeout": 60000,
212
- "waitUntil": {
213
- "networkIdleTime": 500,
214
- "domIdleTime": 1000,
215
- "find": {
216
- "selector": ".main-content",
217
- "elementText": "Dashboard"
218
- }
219
- }
220
- },
221
- {
222
- "url": "https://www.example.com/app",
223
- "timeout": 60000,
224
- "waitUntil": {
225
- "networkIdleTime": null
226
- }
227
- },
228
- {
229
- "url": "https://www.example.com/status",
230
- "waitUntil": {
231
- "find": {
232
- "elementText": "System operational"
233
- }
234
- }
235
- },
236
- {
237
- "url": "http://localhost:8092",
238
- "waitUntil": {
239
- "find": {
240
- "selector": "button",
241
- "elementText": "Standard Button",
242
- "elementTestId": "standard-btn",
243
- "elementAria": "Sample Standard Button",
244
- "elementId": "standard-btn",
245
- "elementClass": [
246
- "btn"
247
- ],
248
- "elementAttribute": {
249
- "type": "button",
250
- "value": "Standard Button"
251
- }
252
- }
253
- }
254
- }
255
- ],
256
- "$id": "/home/runner/work/doc-detective/doc-detective/src/common/src/schemas/src_schemas/goTo_v3.schema.json"
257
- }
@@ -1,321 +0,0 @@
1
- {
2
- "title": "httpRequest",
3
- "type": "object",
4
- "description": "Perform a generic HTTP request, for example to an API.",
5
- "properties": {
6
- "id": {
7
- "type": "string",
8
- "description": "ID of the step."
9
- },
10
- "description": {
11
- "type": "string",
12
- "description": "Description of the step."
13
- },
14
- "action": {
15
- "type": "string",
16
- "const": "httpRequest",
17
- "description": "Action to perform."
18
- },
19
- "url": {
20
- "type": "string",
21
- "description": "URL for the HTTP request.",
22
- "pattern": "(^(http://|https://).*|\\$[A-Za-z0-9_]+)",
23
- "transform": [
24
- "trim"
25
- ]
26
- },
27
- "openApi": {
28
- "allOf": [
29
- {
30
- "$ref": "/home/runner/work/doc-detective/doc-detective/src/common/src/schemas/build/openApi_v2.schema.json#"
31
- },
32
- {
33
- "type": "object",
34
- "required": [
35
- "operationId"
36
- ]
37
- }
38
- ]
39
- },
40
- "statusCodes": {
41
- "description": "Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails.",
42
- "type": "array",
43
- "items": {
44
- "oneOf": [
45
- {
46
- "type": "integer"
47
- }
48
- ]
49
- },
50
- "default": [
51
- 200
52
- ]
53
- },
54
- "method": {
55
- "type": "string",
56
- "description": "Method of the HTTP request",
57
- "enum": [
58
- "get",
59
- "put",
60
- "post",
61
- "patch",
62
- "delete"
63
- ],
64
- "transform": [
65
- "trim",
66
- "toEnumCase"
67
- ],
68
- "default": "get"
69
- },
70
- "timeout": {
71
- "type": "integer",
72
- "description": "Timeout for the HTTP request, in milliseconds.",
73
- "default": 60000
74
- },
75
- "requestHeaders": {
76
- "description": "Headers to include in the HTTP request, in key/value format.",
77
- "type": "object",
78
- "additionalProperties": true,
79
- "properties": {},
80
- "default": {}
81
- },
82
- "responseHeaders": {
83
- "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.",
84
- "type": "object",
85
- "additionalProperties": true,
86
- "properties": {},
87
- "default": {}
88
- },
89
- "requestParams": {
90
- "description": "URL parameters to include in the HTTP request, in key/value format.",
91
- "type": "object",
92
- "additionalProperties": true,
93
- "default": {},
94
- "properties": {}
95
- },
96
- "responseParams": {
97
- "description": "DEPRECATED.",
98
- "type": "object",
99
- "additionalProperties": true,
100
- "default": {},
101
- "properties": {}
102
- },
103
- "requestData": {
104
- "description": "JSON object to include as the body of the HTTP request.",
105
- "type": "object",
106
- "additionalProperties": true,
107
- "default": {},
108
- "properties": {}
109
- },
110
- "responseData": {
111
- "description": "JSON object expected in the response. If one or more key/value pairs aren't present in the response, the step fails.",
112
- "type": "object",
113
- "additionalProperties": true,
114
- "default": {},
115
- "properties": {}
116
- },
117
- "allowAdditionalFields": {
118
- "type": "boolean",
119
- "description": "If `false`, the step fails when the response data contains fields not specified in `responseData`.",
120
- "default": true
121
- },
122
- "savePath": {
123
- "type": "string",
124
- "description": "File path to save the command's output, relative to `saveDirectory`. Specify a file extension that matches the expected response type, such as `.json` for JSON content or `.txt` for strings."
125
- },
126
- "saveDirectory": {
127
- "type": "string",
128
- "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."
129
- },
130
- "maxVariation": {
131
- "type": "integer",
132
- "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 `savePath`, this value is ignored.",
133
- "default": 0,
134
- "minimum": 0,
135
- "maximum": 100
136
- },
137
- "overwrite": {
138
- "type": "string",
139
- "description": "If `true`, overwrites the existing output at `savePath` if it exists.\nIf `byVariation`, overwrites the existing output at `savePath` if the difference between the new output and the existing output is greater than `maxVariation`.",
140
- "enum": [
141
- "true",
142
- "false",
143
- "byVariation"
144
- ],
145
- "default": "false"
146
- },
147
- "envsFromResponseData": {
148
- "description": "Environment variables to set based on response variables, as an object of the environment variable name and the jq filter applied to the response data to identify the variable's value.",
149
- "type": "array",
150
- "default": [],
151
- "items": {
152
- "oneOf": [
153
- {
154
- "description": "",
155
- "type": "object",
156
- "properties": {
157
- "name": {
158
- "description": "Name of the environment variable to set.",
159
- "type": "string"
160
- },
161
- "jqFilter": {
162
- "description": "jq filter to apply to the response data. If the filter doesn't return a value, the environment variable isn't set.",
163
- "type": "string"
164
- }
165
- },
166
- "required": [
167
- "name",
168
- "jqFilter"
169
- ]
170
- }
171
- ]
172
- }
173
- }
174
- },
175
- "dynamicDefaults": {
176
- "id": "uuid"
177
- },
178
- "anyOf": [
179
- {
180
- "required": [
181
- "url"
182
- ]
183
- },
184
- {
185
- "required": [
186
- "openApi"
187
- ]
188
- }
189
- ],
190
- "required": [
191
- "action"
192
- ],
193
- "additionalProperties": false,
194
- "examples": [
195
- {
196
- "action": "httpRequest",
197
- "url": "https://reqres.in/api/users"
198
- },
199
- {
200
- "action": "httpRequest",
201
- "url": "https://reqres.in/api/users/2",
202
- "method": "put",
203
- "requestData": {
204
- "name": "morpheus",
205
- "job": "zion resident"
206
- }
207
- },
208
- {
209
- "action": "httpRequest",
210
- "url": "https://reqres.in/api/users",
211
- "method": "post",
212
- "requestData": {
213
- "name": "morpheus",
214
- "job": "leader"
215
- },
216
- "responseData": {
217
- "name": "morpheus",
218
- "job": "leader"
219
- },
220
- "statusCodes": [
221
- 200,
222
- 201
223
- ]
224
- },
225
- {
226
- "action": "httpRequest",
227
- "url": "https://www.api-server.com",
228
- "method": "post",
229
- "timeout": 30000,
230
- "requestHeaders": {
231
- "header": "value"
232
- },
233
- "requestParams": {
234
- "param": "value"
235
- },
236
- "requestData": {
237
- "field": "value"
238
- },
239
- "responseHeaders": {
240
- "header": "value"
241
- },
242
- "responseData": {
243
- "field": "value"
244
- },
245
- "statusCodes": [
246
- 200
247
- ]
248
- },
249
- {
250
- "action": "httpRequest",
251
- "url": "https://reqres.in/api/users",
252
- "method": "post",
253
- "requestData": {
254
- "name": "morpheus",
255
- "job": "leader"
256
- },
257
- "responseData": {
258
- "name": "morpheus",
259
- "job": "leader"
260
- },
261
- "statusCodes": [
262
- 200,
263
- 201
264
- ],
265
- "savePath": "response.json",
266
- "saveDirectory": "media",
267
- "maxVariation": 5,
268
- "overwrite": "byVariation"
269
- },
270
- {
271
- "action": "httpRequest",
272
- "openApi": {
273
- "name": "Reqres",
274
- "operationId": "getUserById"
275
- },
276
- "requestParams": {
277
- "id": 123
278
- }
279
- },
280
- {
281
- "action": "httpRequest",
282
- "openApi": {
283
- "descriptionPath": "https://api.example.com/openapi.json",
284
- "operationId": "getUserById"
285
- },
286
- "requestParams": {
287
- "id": 123
288
- }
289
- },
290
- {
291
- "action": "httpRequest",
292
- "openApi": {
293
- "descriptionPath": "https://api.example.com/openapi.json",
294
- "operationId": "createUser",
295
- "useExample": "both"
296
- }
297
- },
298
- {
299
- "action": "httpRequest",
300
- "openApi": {
301
- "descriptionPath": "https://api.example.com/openapi.json",
302
- "operationId": "updateUser",
303
- "useExample": "request",
304
- "exampleKey": "acme"
305
- }
306
- },
307
- {
308
- "action": "httpRequest",
309
- "openApi": {
310
- "descriptionPath": "https://api.example.com/openapi.json",
311
- "operationId": "updateUser",
312
- "useExample": "request",
313
- "exampleKey": "acme",
314
- "requestHeaders": {
315
- "Authorization": "Bearer $TOKEN"
316
- }
317
- }
318
- }
319
- ],
320
- "$id": "/home/runner/work/doc-detective/doc-detective/src/common/src/schemas/src_schemas/httpRequest_v2.schema.json"
321
- }