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,2628 +0,0 @@
1
- {
2
- "title": "config",
3
- "description": "Configuration options for Doc Detective operations.",
4
- "type": "object",
5
- "additionalProperties": false,
6
- "properties": {
7
- "defaultCommand": {
8
- "description": "Default command to run when no command is specified.",
9
- "type": "string",
10
- "enum": [
11
- "runTests",
12
- "runCoverage"
13
- ]
14
- },
15
- "input": {
16
- "default": ".",
17
- "description": "Path(s) to test specifications and documentation source files. May be paths to specific files or to directories to scan for files.",
18
- "anyOf": [
19
- {
20
- "type": "string"
21
- },
22
- {
23
- "type": "array",
24
- "items": {
25
- "anyOf": [
26
- {
27
- "type": "string"
28
- }
29
- ]
30
- }
31
- }
32
- ]
33
- },
34
- "output": {
35
- "default": ".",
36
- "description": "Path of the of the file or directory in which to store the output of Doc Detective commands. If a file path is specified, the output is written to that file. If a file of that name already exists, Doc Detective creates appends an integer to the result file name. If a directory path is specified, the output file name is dependent on the command being run.",
37
- "type": "string"
38
- },
39
- "recursive": {
40
- "default": true,
41
- "description": "If `true` searches `input`, `setup`, and `cleanup` paths recursively for test specificaions and source files.",
42
- "type": "boolean"
43
- },
44
- "relativePathBase": {
45
- "description": "Whether paths should be interpreted as relative to the current working directory (`cwd`) or to the file in which they're specified (`file`).",
46
- "type": "string",
47
- "enum": [
48
- "cwd",
49
- "file"
50
- ],
51
- "default": "cwd"
52
- },
53
- "envVariables": {
54
- "description": "Path to a `.env` file to load before performing a Doc Detective operation.",
55
- "type": "string"
56
- },
57
- "runTests": {
58
- "type": "object",
59
- "additionalProperties": false,
60
- "description": "Options for running tests. When running tests, values set here override general configuration options.",
61
- "properties": {
62
- "input": {
63
- "description": "Path(s) to test specifications and documentation source files. May be paths to specific files or to directories to scan for files.",
64
- "anyOf": [
65
- {
66
- "type": "string"
67
- },
68
- {
69
- "type": "array",
70
- "items": {
71
- "anyOf": [
72
- {
73
- "type": "string"
74
- }
75
- ]
76
- }
77
- }
78
- ]
79
- },
80
- "output": {
81
- "description": "Path of the of the file or directory in which to store the output of Doc Detective commands. If a file path is specified, the output is written to that file. If a file of that name already exists, Doc Detective creates appends an integer to the result file name. If a directory path is specified, the output file name is dependent on the command being run.",
82
- "type": "string",
83
- "default": "."
84
- },
85
- "setup": {
86
- "description": "Path(s) to test specifications to perform before those specified by `input`. Useful for setting up testing environments.",
87
- "anyOf": [
88
- {
89
- "type": "string"
90
- },
91
- {
92
- "type": "array",
93
- "items": {
94
- "anyOf": [
95
- {
96
- "type": "string"
97
- }
98
- ]
99
- }
100
- }
101
- ]
102
- },
103
- "cleanup": {
104
- "description": "Path(s) to test specifications to perform after those specified by `input`. Useful for cleaning up testing environments.",
105
- "anyOf": [
106
- {
107
- "type": "string"
108
- },
109
- {
110
- "type": "array",
111
- "items": {
112
- "anyOf": [
113
- {
114
- "type": "string"
115
- }
116
- ]
117
- }
118
- }
119
- ]
120
- },
121
- "recursive": {
122
- "description": "If `true` searches `input`, `setup`, and `cleanup` paths recursively for test specificaions and source files.",
123
- "type": "boolean"
124
- },
125
- "detectSteps": {
126
- "type": "boolean",
127
- "description": "Whether or not to detect steps in input files based on markup regex.",
128
- "default": false
129
- },
130
- "mediaDirectory": {
131
- "description": "DEPRECATED.",
132
- "type": "string",
133
- "default": "."
134
- },
135
- "downloadDirectory": {
136
- "description": "Path of the directory in which to store downloaded files.",
137
- "type": "string",
138
- "default": "."
139
- },
140
- "contexts": {
141
- "type": "array",
142
- "description": "Application/platform sets to run tests in. If no contexts are specified but a context is required by one or more tests, Doc Detective attempts to identify a supported context in the current environment and run tests against it.",
143
- "items": {
144
- "oneOf": [
145
- {
146
- "title": "context",
147
- "type": "object",
148
- "description": "An application and supported platforms.\n\nIf no contexts are specified but a context is required by one or more tests, Doc Detective attempts to identify a supported context in the current environment and run tests against it. For browsers, context priority is Firefox > Chrome > Chromium.",
149
- "properties": {
150
- "app": {
151
- "type": "object",
152
- "description": "The application to run.",
153
- "additionalProperties": false,
154
- "required": [
155
- "name"
156
- ],
157
- "properties": {
158
- "name": {
159
- "type": "string",
160
- "description": "Name of the application.",
161
- "enum": [
162
- "chrome",
163
- "firefox",
164
- "safari",
165
- "edge"
166
- ]
167
- },
168
- "path": {
169
- "type": "string",
170
- "description": "Absolute path or command for the application. If not specified, defaults to typical install paths per platform. If specified but the path is invalid, the context is skipped."
171
- },
172
- "options": {
173
- "type": "object",
174
- "description": "Options to pass to the app. Only works when `name` is `firefox` or `chrome`.",
175
- "additionalProperties": false,
176
- "properties": {
177
- "width": {
178
- "type": "integer",
179
- "description": "Width of the window in pixels."
180
- },
181
- "height": {
182
- "type": "integer",
183
- "description": "Height of the window in pixels."
184
- },
185
- "viewport_height": {
186
- "type": "integer",
187
- "description": "Height of the viewport in pixels. Overrides `height`."
188
- },
189
- "viewport_width": {
190
- "type": "integer",
191
- "description": "Width of the viewport in pixels. Overrides `width`."
192
- },
193
- "headless": {
194
- "type": "boolean",
195
- "description": "If `true`, runs the browser in headless mode. Not supported by Safari."
196
- },
197
- "driverPath": {
198
- "type": "string",
199
- "description": "Path to the browser driver. If not specified, defaults to internally managed dependencies."
200
- }
201
- }
202
- }
203
- }
204
- },
205
- "platforms": {
206
- "description": "Supported platforms for the application.",
207
- "type": "array",
208
- "items": {
209
- "type": "string",
210
- "enum": [
211
- "linux",
212
- "mac",
213
- "windows"
214
- ]
215
- }
216
- }
217
- },
218
- "required": [
219
- "app",
220
- "platforms"
221
- ],
222
- "additionalProperties": false,
223
- "examples": [
224
- {
225
- "app": {
226
- "name": "chrome"
227
- },
228
- "platforms": [
229
- "linux"
230
- ]
231
- },
232
- {
233
- "app": {
234
- "name": "chrome",
235
- "options": {
236
- "viewport_width": 800,
237
- "viewport_height": 600
238
- }
239
- },
240
- "platforms": [
241
- "linux"
242
- ]
243
- },
244
- {
245
- "app": {
246
- "name": "firefox",
247
- "options": {
248
- "width": 800,
249
- "height": 600,
250
- "headless": false,
251
- "driverPath": "/usr/bin/geckodriver"
252
- }
253
- },
254
- "platforms": [
255
- "linux",
256
- "windows",
257
- "mac"
258
- ]
259
- },
260
- {
261
- "app": {
262
- "name": "safari"
263
- },
264
- "platforms": [
265
- "mac"
266
- ]
267
- },
268
- {
269
- "app": {
270
- "name": "firefox",
271
- "path": "/usr/bin/firefox"
272
- },
273
- "platforms": [
274
- "linux"
275
- ]
276
- }
277
- ]
278
- }
279
- ]
280
- },
281
- "default": [
282
- {
283
- "app": {
284
- "name": "firefox",
285
- "options": {
286
- "width": 1200,
287
- "height": 800,
288
- "headless": true
289
- }
290
- },
291
- "platforms": [
292
- "linux",
293
- "mac",
294
- "windows"
295
- ]
296
- }
297
- ]
298
- }
299
- }
300
- },
301
- "runCoverage": {
302
- "description": "Options for performing test coverage analysis on documentation source files. When performing coveration analysis, values set here override general configuration options.",
303
- "type": "object",
304
- "additionalProperties": false,
305
- "properties": {
306
- "input": {
307
- "description": "Path(s) to test specifications and documentation source files. May be paths to specific files or to directories to scan for files.",
308
- "anyOf": [
309
- {
310
- "type": "string"
311
- },
312
- {
313
- "type": "array",
314
- "items": {
315
- "anyOf": [
316
- {
317
- "type": "string"
318
- }
319
- ]
320
- }
321
- }
322
- ]
323
- },
324
- "output": {
325
- "description": "Path of the of the file or directory in which to store the output of Doc Detective commands. If a file path is specified, the output is written to that file. If a file of that name already exists, Doc Detective creates appends an integer to the result file name. If a directory path is specified, the output file name is dependent on the command being run.",
326
- "type": "string",
327
- "default": "."
328
- },
329
- "recursive": {
330
- "description": "If `true` searches `input`, `setup`, and `cleanup` paths recursively for test specificaions and source files.",
331
- "type": "boolean"
332
- },
333
- "markup": {
334
- "default": [
335
- "onscreenText",
336
- "emphasis",
337
- "image",
338
- "hyperlink",
339
- "codeInline",
340
- "codeBlock",
341
- "interaction"
342
- ],
343
- "description": "Markup types to include when performing this operation. If no markup types are specified, the operation includes all markup types as defined in `fileTypes`.",
344
- "type": "array",
345
- "items": {
346
- "oneOf": [
347
- {
348
- "type": "string"
349
- }
350
- ]
351
- }
352
- }
353
- }
354
- },
355
- "suggestTests": {
356
- "description": "Options for suggesting tests based on documentation source files. When suggesting tests, values set here override general condiguration options.",
357
- "type": "object",
358
- "additionalProperties": false,
359
- "properties": {
360
- "input": {
361
- "description": "Path(s) to test specifications and documentation source files. May be paths to specific files or to directories to scan for files.",
362
- "anyOf": [
363
- {
364
- "type": "string"
365
- },
366
- {
367
- "type": "array",
368
- "items": {
369
- "anyOf": [
370
- {
371
- "type": "string"
372
- }
373
- ]
374
- }
375
- }
376
- ]
377
- },
378
- "output": {
379
- "description": "Path of the of the file or directory in which to store the output of Doc Detective commands. If a file path is specified, the output is written to that file. If a file of that name already exists, Doc Detective creates appends an integer to the result file name. If a directory path is specified, the output file name is dependent on the command being run.",
380
- "type": "string",
381
- "default": "."
382
- },
383
- "recursive": {
384
- "description": "If `true` searches `input`, `setup`, and `cleanup` paths recursively for test specificaions and source files.",
385
- "type": "boolean"
386
- },
387
- "markup": {
388
- "default": [
389
- "onscreenText",
390
- "emphasis",
391
- "image",
392
- "hyperlink",
393
- "codeInline",
394
- "codeBlock",
395
- "interaction"
396
- ],
397
- "description": "Markup types to include when performing this operation. If no markup types are specified, the operation includes all markup types as defined in `fileTypes`.",
398
- "type": "array",
399
- "items": {
400
- "oneOf": [
401
- {
402
- "type": "string"
403
- }
404
- ]
405
- }
406
- }
407
- }
408
- },
409
- "fileTypes": {
410
- "description": "Information on supported file types and how to parse the markup within them.",
411
- "type": "array",
412
- "items": {
413
- "oneOf": [
414
- {
415
- "type": "object",
416
- "additionalProperties": false,
417
- "properties": {
418
- "name": {
419
- "description": "Name of the file type.",
420
- "type": "string"
421
- },
422
- "extensions": {
423
- "description": "File extensions to support with this configuration.",
424
- "type": "array",
425
- "items": {
426
- "oneOf": [
427
- {
428
- "type": "string"
429
- }
430
- ]
431
- }
432
- },
433
- "testStartStatementOpen": {
434
- "description": "Opening of an in-document test start statement.",
435
- "type": "string"
436
- },
437
- "testStartStatementClose": {
438
- "description": "Close of an in-document test start statement.",
439
- "type": "string"
440
- },
441
- "testIgnoreStatement": {
442
- "description": "Text for an in-document test ignore statement.",
443
- "type": "string"
444
- },
445
- "testEndStatement": {
446
- "description": "Text for an in-document test end statement.",
447
- "type": "string"
448
- },
449
- "stepStatementOpen": {
450
- "description": "Opening of an in-document step statement.",
451
- "type": "string"
452
- },
453
- "stepStatementClose": {
454
- "description": "Close of an in-document step statement.",
455
- "type": "string"
456
- },
457
- "markup": {
458
- "description": "Markup types and associated regex patterns to find in documentation source files.",
459
- "type": "array",
460
- "items": {
461
- "oneOf": [
462
- {
463
- "type": "object",
464
- "additionalProperties": false,
465
- "properties": {
466
- "name": {
467
- "description": "Name of the markup type.",
468
- "type": "string"
469
- },
470
- "regex": {
471
- "description": "Regex patterns to find the markup type in documentation source files.",
472
- "type": "array",
473
- "minItems": 1,
474
- "items": {
475
- "oneOf": [
476
- {
477
- "type": "string"
478
- }
479
- ]
480
- }
481
- },
482
- "actions": {
483
- "description": "Actions that apply to the markup type.",
484
- "type": "array",
485
- "items": {
486
- "oneOf": [
487
- {
488
- "type": "string",
489
- "enum": [
490
- "checkLink",
491
- "find",
492
- "goTo",
493
- "httpRequest",
494
- "runShell",
495
- "saveScreenshot",
496
- "setVariables",
497
- "startRecording",
498
- "stopRecording",
499
- "typeKeys",
500
- "wait"
501
- ]
502
- },
503
- {
504
- "type": "object",
505
- "additionalProperties": false,
506
- "properties": {
507
- "name": {
508
- "description": "Name of the action.",
509
- "type": "string",
510
- "enum": [
511
- "checkLink",
512
- "find",
513
- "goTo",
514
- "httpRequest",
515
- "runShell",
516
- "saveScreenshot",
517
- "setVariables",
518
- "startRecording",
519
- "stopRecording",
520
- "typeKeys",
521
- "wait"
522
- ]
523
- },
524
- "params": {
525
- "description": "Parameters for the action.",
526
- "type": "object",
527
- "additionalProperties": true
528
- }
529
- },
530
- "required": [
531
- "name"
532
- ]
533
- },
534
- {
535
- "title": "checkLink",
536
- "type": "object",
537
- "description": "Check if a URL returns an acceptable status code from a GET request.",
538
- "properties": {
539
- "id": {
540
- "type": "string",
541
- "description": "ID of the step."
542
- },
543
- "description": {
544
- "type": "string",
545
- "description": "Description of the step."
546
- },
547
- "action": {
548
- "type": "string",
549
- "const": "checkLink",
550
- "description": "Action to perform."
551
- },
552
- "url": {
553
- "type": "string",
554
- "description": "URL to check.",
555
- "pattern": "(^(http://|https://|/).*|\\$[A-Za-z0-9_]+)",
556
- "transform": [
557
- "trim"
558
- ]
559
- },
560
- "origin": {
561
- "type": "string",
562
- "description": "Protocol and domain to navigate to. Prepended to `url`.",
563
- "transform": [
564
- "trim"
565
- ]
566
- },
567
- "statusCodes": {
568
- "description": "Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails.",
569
- "type": "array",
570
- "items": {
571
- "oneOf": [
572
- {
573
- "type": "integer"
574
- }
575
- ]
576
- },
577
- "default": [
578
- 200,
579
- 201,
580
- 202
581
- ]
582
- }
583
- },
584
- "dynamicDefaults": {
585
- "id": "uuid"
586
- },
587
- "required": [
588
- "action",
589
- "url"
590
- ],
591
- "additionalProperties": false,
592
- "examples": [
593
- {
594
- "action": "checkLink",
595
- "url": "https://www.google.com"
596
- },
597
- {
598
- "action": "checkLink",
599
- "url": "https://www.google.com",
600
- "statusCodes": [
601
- 200
602
- ]
603
- },
604
- {
605
- "action": "checkLink",
606
- "url": "/search",
607
- "origin": "www.google.com",
608
- "statusCodes": [
609
- 200
610
- ]
611
- }
612
- ]
613
- },
614
- {
615
- "title": "find",
616
- "type": "object",
617
- "description": "Check if an element exists with the specified CSS selector.",
618
- "properties": {
619
- "id": {
620
- "type": "string",
621
- "description": "ID of the step."
622
- },
623
- "description": {
624
- "type": "string",
625
- "description": "Description of the step."
626
- },
627
- "action": {
628
- "type": "string",
629
- "const": "find",
630
- "description": "Action to perform."
631
- },
632
- "selector": {
633
- "description": "Selector that uniquely identifies the element.",
634
- "type": "string"
635
- },
636
- "timeout": {
637
- "type": "integer",
638
- "description": "Max duration in milliseconds to wait for the element to exist.",
639
- "default": 5000
640
- },
641
- "matchText": {
642
- "type": "string",
643
- "description": "Text that the element should contain. If the element doesn't contain the text, the step fails. Accepts both strings and regular expressions. To use a regular expression, the expression should start and end with a `/`. For example, `/search/`."
644
- },
645
- "moveTo": {
646
- "description": "Move to the element. If the element isn't visible, it's scrolled into view. Only runs if the test is being recorded.",
647
- "oneOf": [
648
- {
649
- "type": "boolean"
650
- }
651
- ],
652
- "default": false
653
- },
654
- "click": {
655
- "description": "Click the element.",
656
- "oneOf": [
657
- {
658
- "type": "boolean",
659
- "default": false
660
- },
661
- {
662
- "type": "object",
663
- "additionalProperties": false,
664
- "properties": {
665
- "button": {
666
- "description": "Kind of click to perform.",
667
- "type": "string",
668
- "enum": [
669
- "left",
670
- "right",
671
- "middle"
672
- ]
673
- }
674
- }
675
- }
676
- ]
677
- },
678
- "typeKeys": {
679
- "description": "Type keys after finding the element. Either a string or an object with a `keys` field as defined in [`typeKeys`](typeKeys). To type in the element, make the element active with the `click` parameter.",
680
- "oneOf": [
681
- {
682
- "type": "string"
683
- },
684
- {
685
- "type": "object",
686
- "additionalProperties": false,
687
- "properties": {
688
- "keys": {
689
- "description": "String of keys to enter.",
690
- "anyOf": [
691
- {
692
- "type": "string"
693
- },
694
- {
695
- "type": "array",
696
- "items": {
697
- "oneOf": [
698
- {
699
- "type": "string"
700
- }
701
- ]
702
- }
703
- }
704
- ]
705
- },
706
- "delay": {
707
- "type": "number",
708
- "description": "Delay in milliseconds between each key press. Only valid during a recording.",
709
- "default": 100
710
- }
711
- }
712
- }
713
- ]
714
- },
715
- "setVariables": {
716
- "type": "array",
717
- "description": "Extract environment variables from the element's text.",
718
- "items": {
719
- "oneOf": [
720
- {
721
- "description": "",
722
- "type": "object",
723
- "properties": {
724
- "name": {
725
- "description": "Name of the environment variable to set.",
726
- "type": "string"
727
- },
728
- "regex": {
729
- "description": "Regex to extract the environment variable from the element's text.",
730
- "type": "string"
731
- }
732
- },
733
- "required": [
734
- "name",
735
- "regex"
736
- ]
737
- }
738
- ]
739
- },
740
- "default": []
741
- }
742
- },
743
- "required": [
744
- "action",
745
- "selector"
746
- ],
747
- "dynamicDefaults": {
748
- "id": "uuid"
749
- },
750
- "additionalProperties": false,
751
- "examples": [
752
- {
753
- "action": "find",
754
- "selector": "[title=Search]"
755
- },
756
- {
757
- "action": "find",
758
- "selector": "[title=Search]",
759
- "timeout": 10000,
760
- "matchText": "Search",
761
- "moveTo": true,
762
- "click": true,
763
- "typeKeys": "shorthair cat"
764
- },
765
- {
766
- "action": "find",
767
- "selector": "[title=Search]",
768
- "click": {
769
- "button": "right"
770
- }
771
- },
772
- {
773
- "action": "find",
774
- "selector": "[title=Search]",
775
- "timeout": 10000,
776
- "matchText": "Search",
777
- "moveTo": true,
778
- "click": true,
779
- "typeKeys": {
780
- "keys": [
781
- "shorthair cat"
782
- ],
783
- "delay": 100
784
- }
785
- },
786
- {
787
- "action": "find",
788
- "selector": "[title=ResultsCount]",
789
- "setVariables": [
790
- {
791
- "name": "resultsCount",
792
- "regex": ".*"
793
- }
794
- ]
795
- }
796
- ]
797
- },
798
- {
799
- "title": "goTo",
800
- "type": "object",
801
- "description": "Navigate to a specified URL.",
802
- "properties": {
803
- "id": {
804
- "type": "string",
805
- "description": "ID of the step."
806
- },
807
- "description": {
808
- "type": "string",
809
- "description": "Description of the step."
810
- },
811
- "action": {
812
- "type": "string",
813
- "const": "goTo",
814
- "description": "Action to perform."
815
- },
816
- "url": {
817
- "type": "string",
818
- "description": "URL to navigate to.",
819
- "pattern": "(^(http://|https://|/).*|\\$[A-Za-z0-9_]+)",
820
- "transform": [
821
- "trim"
822
- ]
823
- },
824
- "origin": {
825
- "type": "string",
826
- "description": "Protocol and domain to navigate to. Prepended to `url`.",
827
- "transform": [
828
- "trim"
829
- ]
830
- }
831
- },
832
- "dynamicDefaults": {
833
- "id": "uuid"
834
- },
835
- "required": [
836
- "action",
837
- "url"
838
- ],
839
- "additionalProperties": false,
840
- "examples": [
841
- {
842
- "action": "goTo",
843
- "url": "https://www.google.com"
844
- },
845
- {
846
- "id": "ddec5e20-2e81-4f38-867c-92c8d9516755",
847
- "description": "This is a test!",
848
- "action": "goTo",
849
- "url": "https://www.google.com"
850
- },
851
- {
852
- "id": "ddec5e20-2e81-4f38-867c-92c8d9516756",
853
- "description": "This is a test!",
854
- "action": "goTo",
855
- "url": "/search",
856
- "origin": "https://www.google.com"
857
- }
858
- ]
859
- },
860
- {
861
- "title": "httpRequest",
862
- "type": "object",
863
- "description": "Perform a generic HTTP request, for example to an API.",
864
- "properties": {
865
- "id": {
866
- "type": "string",
867
- "description": "ID of the step."
868
- },
869
- "description": {
870
- "type": "string",
871
- "description": "Description of the step."
872
- },
873
- "action": {
874
- "type": "string",
875
- "const": "httpRequest",
876
- "description": "Action to perform."
877
- },
878
- "url": {
879
- "type": "string",
880
- "description": "URL for the HTTP request.",
881
- "pattern": "(^(http://|https://).*|\\$[A-Za-z0-9_]+)",
882
- "transform": [
883
- "trim"
884
- ]
885
- },
886
- "openApi": {
887
- "allOf": [
888
- {
889
- "version": "1.0.0",
890
- "$schema": "http://json-schema.org/draft-07/schema#",
891
- "title": "openApi",
892
- "type": "object",
893
- "description": "OpenAPI definition and configuration.",
894
- "additionalProperties": false,
895
- "properties": {
896
- "name": {
897
- "type": "string",
898
- "description": "Name of the OpenAPI definition, as defined in your configuration."
899
- },
900
- "descriptionPath": {
901
- "type": "string",
902
- "description": "URL or local path to the OpenAPI definition."
903
- },
904
- "operationId": {
905
- "type": "string",
906
- "description": "ID of the operation to use for the request."
907
- },
908
- "server": {
909
- "type": "string",
910
- "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 definition."
911
- },
912
- "validateAgainstSchema": {
913
- "type": "string",
914
- "description": "Validates the request and/or response against the schema in the OpenAPI definition. If the request or response doesn't match the schema, the step fails.",
915
- "enum": [
916
- "request",
917
- "response",
918
- "both",
919
- "none"
920
- ],
921
- "default": "both"
922
- },
923
- "mockResponse": {
924
- "type": "boolean",
925
- "description": "If `true`, doesn't make the HTTP request, but instead uses the response example or schema from the OpenAPI definition 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."
926
- },
927
- "statusCode": {
928
- "type": "integer",
929
- "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."
930
- },
931
- "useExample": {
932
- "type": [
933
- "string"
934
- ],
935
- "description": "Uses the example from the OpenAPI definition 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.",
936
- "enum": [
937
- "request",
938
- "response",
939
- "both",
940
- "none"
941
- ],
942
- "default": "none"
943
- },
944
- "exampleKey": {
945
- "type": "string",
946
- "description": "Key of the example to use from the `examples` property in the OpenAPI definition. If an `examples` key isn't specified or isn't available for a given parameter or object, the `example` property value is used.",
947
- "default": ""
948
- },
949
- "requestHeaders": {
950
- "type": "object",
951
- "description": "Request headers to add to the request. If specified in both a config and a step, the step value overrides the config value.",
952
- "additionalProperties": {
953
- "type": "string"
954
- }
955
- }
956
- },
957
- "examples": [
958
- {
959
- "descriptionPath": "https://petstore.swagger.io/v2/swagger.json"
960
- }
961
- ]
962
- },
963
- {
964
- "type": "object",
965
- "required": [
966
- "operationId"
967
- ]
968
- }
969
- ]
970
- },
971
- "statusCodes": {
972
- "description": "Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails.",
973
- "type": "array",
974
- "items": {
975
- "oneOf": [
976
- {
977
- "type": "integer"
978
- }
979
- ]
980
- },
981
- "default": [
982
- 200
983
- ]
984
- },
985
- "method": {
986
- "type": "string",
987
- "description": "Method of the HTTP request",
988
- "enum": [
989
- "get",
990
- "put",
991
- "post",
992
- "patch",
993
- "delete"
994
- ],
995
- "transform": [
996
- "trim",
997
- "toEnumCase"
998
- ],
999
- "default": "get"
1000
- },
1001
- "timeout": {
1002
- "type": "integer",
1003
- "description": "Timeout for the HTTP request, in milliseconds.",
1004
- "default": 60000
1005
- },
1006
- "requestHeaders": {
1007
- "description": "Headers to include in the HTTP request, in key/value format.",
1008
- "type": "object",
1009
- "additionalProperties": true,
1010
- "properties": {},
1011
- "default": {}
1012
- },
1013
- "responseHeaders": {
1014
- "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.",
1015
- "type": "object",
1016
- "additionalProperties": true,
1017
- "properties": {},
1018
- "default": {}
1019
- },
1020
- "requestParams": {
1021
- "description": "URL parameters to include in the HTTP request, in key/value format.",
1022
- "type": "object",
1023
- "additionalProperties": true,
1024
- "default": {},
1025
- "properties": {}
1026
- },
1027
- "responseParams": {
1028
- "description": "DEPRECATED.",
1029
- "type": "object",
1030
- "additionalProperties": true,
1031
- "default": {},
1032
- "properties": {}
1033
- },
1034
- "requestData": {
1035
- "description": "JSON object to include as the body of the HTTP request.",
1036
- "type": "object",
1037
- "additionalProperties": true,
1038
- "default": {},
1039
- "properties": {}
1040
- },
1041
- "responseData": {
1042
- "description": "JSON object expected in the response. If one or more key/value pairs aren't present in the response, the step fails.",
1043
- "type": "object",
1044
- "additionalProperties": true,
1045
- "default": {},
1046
- "properties": {}
1047
- },
1048
- "allowAdditionalFields": {
1049
- "type": "boolean",
1050
- "description": "If `false`, the step fails when the response data contains fields not specified in `responseData`.",
1051
- "default": true
1052
- },
1053
- "savePath": {
1054
- "type": "string",
1055
- "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."
1056
- },
1057
- "saveDirectory": {
1058
- "type": "string",
1059
- "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."
1060
- },
1061
- "maxVariation": {
1062
- "type": "integer",
1063
- "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.",
1064
- "default": 0,
1065
- "minimum": 0,
1066
- "maximum": 100
1067
- },
1068
- "overwrite": {
1069
- "type": "string",
1070
- "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`.",
1071
- "enum": [
1072
- "true",
1073
- "false",
1074
- "byVariation"
1075
- ],
1076
- "default": "false"
1077
- },
1078
- "envsFromResponseData": {
1079
- "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.",
1080
- "type": "array",
1081
- "default": [],
1082
- "items": {
1083
- "oneOf": [
1084
- {
1085
- "description": "",
1086
- "type": "object",
1087
- "properties": {
1088
- "name": {
1089
- "description": "Name of the environment variable to set.",
1090
- "type": "string"
1091
- },
1092
- "jqFilter": {
1093
- "description": "jq filter to apply to the response data. If the filter doesn't return a value, the environment variable isn't set.",
1094
- "type": "string"
1095
- }
1096
- },
1097
- "required": [
1098
- "name",
1099
- "jqFilter"
1100
- ]
1101
- }
1102
- ]
1103
- }
1104
- }
1105
- },
1106
- "dynamicDefaults": {
1107
- "id": "uuid"
1108
- },
1109
- "anyOf": [
1110
- {
1111
- "required": [
1112
- "url"
1113
- ]
1114
- },
1115
- {
1116
- "required": [
1117
- "openApi"
1118
- ]
1119
- }
1120
- ],
1121
- "required": [
1122
- "action"
1123
- ],
1124
- "additionalProperties": false,
1125
- "examples": [
1126
- {
1127
- "action": "httpRequest",
1128
- "url": "https://reqres.in/api/users"
1129
- },
1130
- {
1131
- "action": "httpRequest",
1132
- "url": "https://reqres.in/api/users/2",
1133
- "method": "put",
1134
- "requestData": {
1135
- "name": "morpheus",
1136
- "job": "zion resident"
1137
- }
1138
- },
1139
- {
1140
- "action": "httpRequest",
1141
- "url": "https://reqres.in/api/users",
1142
- "method": "post",
1143
- "requestData": {
1144
- "name": "morpheus",
1145
- "job": "leader"
1146
- },
1147
- "responseData": {
1148
- "name": "morpheus",
1149
- "job": "leader"
1150
- },
1151
- "statusCodes": [
1152
- 200,
1153
- 201
1154
- ]
1155
- },
1156
- {
1157
- "action": "httpRequest",
1158
- "url": "https://www.api-server.com",
1159
- "method": "post",
1160
- "timeout": 30000,
1161
- "requestHeaders": {
1162
- "header": "value"
1163
- },
1164
- "requestParams": {
1165
- "param": "value"
1166
- },
1167
- "requestData": {
1168
- "field": "value"
1169
- },
1170
- "responseHeaders": {
1171
- "header": "value"
1172
- },
1173
- "responseData": {
1174
- "field": "value"
1175
- },
1176
- "statusCodes": [
1177
- 200
1178
- ]
1179
- },
1180
- {
1181
- "action": "httpRequest",
1182
- "url": "https://reqres.in/api/users",
1183
- "method": "post",
1184
- "requestData": {
1185
- "name": "morpheus",
1186
- "job": "leader"
1187
- },
1188
- "responseData": {
1189
- "name": "morpheus",
1190
- "job": "leader"
1191
- },
1192
- "statusCodes": [
1193
- 200,
1194
- 201
1195
- ],
1196
- "savePath": "response.json",
1197
- "saveDirectory": "media",
1198
- "maxVariation": 5,
1199
- "overwrite": "byVariation"
1200
- },
1201
- {
1202
- "action": "httpRequest",
1203
- "openApi": {
1204
- "name": "Reqres",
1205
- "operationId": "getUserById"
1206
- },
1207
- "requestParams": {
1208
- "id": 123
1209
- }
1210
- },
1211
- {
1212
- "action": "httpRequest",
1213
- "openApi": {
1214
- "descriptionPath": "https://api.example.com/openapi.json",
1215
- "operationId": "getUserById"
1216
- },
1217
- "requestParams": {
1218
- "id": 123
1219
- }
1220
- },
1221
- {
1222
- "action": "httpRequest",
1223
- "openApi": {
1224
- "descriptionPath": "https://api.example.com/openapi.json",
1225
- "operationId": "createUser",
1226
- "useExample": "both"
1227
- }
1228
- },
1229
- {
1230
- "action": "httpRequest",
1231
- "openApi": {
1232
- "descriptionPath": "https://api.example.com/openapi.json",
1233
- "operationId": "updateUser",
1234
- "useExample": "request",
1235
- "exampleKey": "acme"
1236
- }
1237
- },
1238
- {
1239
- "action": "httpRequest",
1240
- "openApi": {
1241
- "descriptionPath": "https://api.example.com/openapi.json",
1242
- "operationId": "updateUser",
1243
- "useExample": "request",
1244
- "exampleKey": "acme",
1245
- "requestHeaders": {
1246
- "Authorization": "Bearer $TOKEN"
1247
- }
1248
- }
1249
- }
1250
- ]
1251
- },
1252
- {
1253
- "title": "runShell",
1254
- "type": "object",
1255
- "description": "Perform a native shell command.",
1256
- "properties": {
1257
- "id": {
1258
- "type": "string",
1259
- "description": "ID of the step."
1260
- },
1261
- "description": {
1262
- "type": "string",
1263
- "description": "Description of the step."
1264
- },
1265
- "action": {
1266
- "type": "string",
1267
- "const": "runShell",
1268
- "description": "The action to perform."
1269
- },
1270
- "command": {
1271
- "type": "string",
1272
- "description": "Command to perform in the machine's default shell."
1273
- },
1274
- "args": {
1275
- "type": "array",
1276
- "description": "Arguments for the command.",
1277
- "items": {
1278
- "oneOf": [
1279
- {
1280
- "type": "string"
1281
- }
1282
- ]
1283
- },
1284
- "default": []
1285
- },
1286
- "workingDirectory": {
1287
- "type": "string",
1288
- "description": "Working directory for the command.",
1289
- "default": "."
1290
- },
1291
- "exitCodes": {
1292
- "type": "array",
1293
- "description": "Expected exit codes of the command. If the command's actual exit code isn't in this list, the step fails.",
1294
- "items": {
1295
- "oneOf": [
1296
- {
1297
- "type": "integer"
1298
- }
1299
- ]
1300
- },
1301
- "default": [
1302
- 0
1303
- ]
1304
- },
1305
- "output": {
1306
- "type": "string",
1307
- "description": "Content expected in the command's output. If the expected content can't be found in the command's output (either stdout or stderr), the step fails. Supports strings and regular expressions. To use a regular expression, the string must start and end with a forward slash, like in `/^hello-world.*/`."
1308
- },
1309
- "savePath": {
1310
- "type": "string",
1311
- "description": "File path to save the command's output, relative to `saveDirectory`."
1312
- },
1313
- "saveDirectory": {
1314
- "type": "string",
1315
- "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."
1316
- },
1317
- "maxVariation": {
1318
- "type": "integer",
1319
- "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.",
1320
- "default": 0,
1321
- "minimum": 0,
1322
- "maximum": 100
1323
- },
1324
- "overwrite": {
1325
- "type": "string",
1326
- "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`.",
1327
- "enum": [
1328
- "true",
1329
- "false",
1330
- "byVariation"
1331
- ],
1332
- "default": "false"
1333
- },
1334
- "timeout": {
1335
- "type": "integer",
1336
- "description": "Max time in milliseconds the command is allowed to run. If the command runs longer than this, the step fails.",
1337
- "default": 60000
1338
- },
1339
- "setVariables": {
1340
- "type": "array",
1341
- "description": "Extract environment variables from the command's output.",
1342
- "items": {
1343
- "oneOf": [
1344
- {
1345
- "description": "",
1346
- "type": "object",
1347
- "properties": {
1348
- "name": {
1349
- "description": "Name of the environment variable to set.",
1350
- "type": "string"
1351
- },
1352
- "regex": {
1353
- "description": "Regex to extract the environment variable from the command's output.",
1354
- "type": "string"
1355
- }
1356
- },
1357
- "required": [
1358
- "name",
1359
- "regex"
1360
- ]
1361
- }
1362
- ]
1363
- },
1364
- "default": []
1365
- }
1366
- },
1367
- "dynamicDefaults": {
1368
- "id": "uuid"
1369
- },
1370
- "additionalProperties": false,
1371
- "required": [
1372
- "action",
1373
- "command"
1374
- ],
1375
- "examples": [
1376
- {
1377
- "action": "runShell",
1378
- "command": "echo",
1379
- "args": [
1380
- "$USER"
1381
- ]
1382
- },
1383
- {
1384
- "action": "runShell",
1385
- "command": "echo",
1386
- "args": [
1387
- "hello-world"
1388
- ],
1389
- "id": "ddec5e20-2e81-4f38-867c-92c8d9516755",
1390
- "description": "This is a test!"
1391
- },
1392
- {
1393
- "action": "runShell",
1394
- "command": "docker run hello-world",
1395
- "timeout": 20000,
1396
- "exitCodes": [
1397
- 0
1398
- ],
1399
- "output": "Hello from Docker!"
1400
- },
1401
- {
1402
- "action": "runShell",
1403
- "command": "false",
1404
- "exitCodes": [
1405
- 1
1406
- ]
1407
- },
1408
- {
1409
- "action": "runShell",
1410
- "command": "echo",
1411
- "args": [
1412
- "setup"
1413
- ],
1414
- "exitCodes": [
1415
- 0
1416
- ],
1417
- "output": "/.*?/",
1418
- "setVariables": [
1419
- {
1420
- "name": "TEST",
1421
- "regex": ".*"
1422
- }
1423
- ]
1424
- },
1425
- {
1426
- "action": "runShell",
1427
- "command": "docker run hello-world",
1428
- "workingDirectory": ".",
1429
- "exitCodes": [
1430
- 0
1431
- ],
1432
- "output": "Hello from Docker!",
1433
- "savePath": "docker-output.txt",
1434
- "saveDirectory": "output",
1435
- "maxVariation": 10,
1436
- "overwrite": "byVariation"
1437
- }
1438
- ]
1439
- },
1440
- {
1441
- "title": "saveScreenshot",
1442
- "type": "object",
1443
- "description": "Takes a screenshot in PNG format.",
1444
- "properties": {
1445
- "id": {
1446
- "type": "string",
1447
- "description": "ID of the step."
1448
- },
1449
- "description": {
1450
- "type": "string",
1451
- "description": "Description of the step."
1452
- },
1453
- "action": {
1454
- "type": "string",
1455
- "const": "saveScreenshot",
1456
- "description": "The action to perform."
1457
- },
1458
- "path": {
1459
- "type": "string",
1460
- "description": "File path of the PNG file, relative to `directory`. If not specified, the file name is the ID of the step.",
1461
- "pattern": "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)"
1462
- },
1463
- "directory": {
1464
- "type": "string",
1465
- "description": "Directory of the PNG file. If the directory doesn't exist, creates the directory."
1466
- },
1467
- "maxVariation": {
1468
- "type": "number",
1469
- "description": "Allowed variation in percentage of pixels between the new screenshot and the existing screenshot at `path`. If the difference between the new screenshot and the existing screenshot is greater than `maxVariation`, the step fails. If a screenshot doesn't exist at `path`, this value is ignored.",
1470
- "default": 5,
1471
- "minimum": 0,
1472
- "maximum": 100
1473
- },
1474
- "overwrite": {
1475
- "type": "string",
1476
- "description": "If `true`, overwrites the existing screenshot at `path` if it exists.\nIf `byVariation`, overwrites the existing screenshot at `path` if the difference between the new screenshot and the existing screenshot is greater than `maxVariation`.",
1477
- "enum": [
1478
- "true",
1479
- "false",
1480
- "byVariation"
1481
- ],
1482
- "default": "false"
1483
- },
1484
- "crop": {
1485
- "type": "object",
1486
- "description": "Crops the screenshot.",
1487
- "properties": {
1488
- "selector": {
1489
- "type": "string",
1490
- "description": "Selector of the element to crop the image to."
1491
- },
1492
- "padding": {
1493
- "oneOf": [
1494
- {
1495
- "type": "number",
1496
- "description": "Padding in pixels to add to the bounds of the element.",
1497
- "minimum": 0
1498
- },
1499
- {
1500
- "type": "object",
1501
- "properties": {
1502
- "top": {
1503
- "type": "number",
1504
- "minimum": 0
1505
- },
1506
- "right": {
1507
- "type": "number",
1508
- "minimum": 0
1509
- },
1510
- "bottom": {
1511
- "type": "number",
1512
- "minimum": 0
1513
- },
1514
- "left": {
1515
- "type": "number",
1516
- "minimum": 0
1517
- }
1518
- }
1519
- }
1520
- ]
1521
- }
1522
- },
1523
- "required": [
1524
- "selector"
1525
- ],
1526
- "additionalProperties": false
1527
- }
1528
- },
1529
- "dynamicDefaults": {
1530
- "id": "uuid"
1531
- },
1532
- "required": [
1533
- "action"
1534
- ],
1535
- "additionalProperties": false,
1536
- "examples": [
1537
- {
1538
- "action": "saveScreenshot"
1539
- },
1540
- {
1541
- "action": "saveScreenshot",
1542
- "path": "results.png"
1543
- },
1544
- {
1545
- "action": "saveScreenshot",
1546
- "path": "results.png",
1547
- "directory": "static/images"
1548
- },
1549
- {
1550
- "action": "saveScreenshot",
1551
- "path": "results.png",
1552
- "directory": "static/images",
1553
- "maxVariation": 10,
1554
- "overwrite": "byVariation"
1555
- },
1556
- {
1557
- "action": "saveScreenshot",
1558
- "path": "results.png",
1559
- "directory": "static/images",
1560
- "crop": {
1561
- "selector": "#element"
1562
- }
1563
- },
1564
- {
1565
- "action": "saveScreenshot",
1566
- "path": "results.png",
1567
- "directory": "static/images",
1568
- "crop": {
1569
- "selector": "#element",
1570
- "padding": 10
1571
- }
1572
- },
1573
- {
1574
- "action": "saveScreenshot",
1575
- "path": "results.png",
1576
- "directory": "static/images",
1577
- "crop": {
1578
- "selector": "#element",
1579
- "padding": {
1580
- "top": 10,
1581
- "right": 20,
1582
- "bottom": 30,
1583
- "left": 40
1584
- }
1585
- }
1586
- }
1587
- ]
1588
- },
1589
- {
1590
- "title": "setVariables",
1591
- "type": "object",
1592
- "description": "Load environment variables from a `.env` file.",
1593
- "properties": {
1594
- "id": {
1595
- "type": "string",
1596
- "description": "ID of the step."
1597
- },
1598
- "description": {
1599
- "type": "string",
1600
- "description": "Description of the step."
1601
- },
1602
- "action": {
1603
- "type": "string",
1604
- "const": "setVariables",
1605
- "description": "Action to perform."
1606
- },
1607
- "path": {
1608
- "type": "string",
1609
- "description": "Path to the `.env` file."
1610
- }
1611
- },
1612
- "dynamicDefaults": {
1613
- "id": "uuid"
1614
- },
1615
- "required": [
1616
- "action",
1617
- "path"
1618
- ],
1619
- "additionalProperties": false,
1620
- "examples": [
1621
- {
1622
- "action": "setVariables",
1623
- "path": ".env"
1624
- }
1625
- ]
1626
- },
1627
- {
1628
- "title": "startRecording",
1629
- "type": "object",
1630
- "description": "Start recording the current browser viewport. Must be followed by a `stopRecording` action. Only runs when the context `app` is `chrome` and `headless` is `false`. Supported extensions: [ '.mp4', '.webm', '.gif' ]",
1631
- "properties": {
1632
- "id": {
1633
- "type": "string",
1634
- "description": "ID of the step."
1635
- },
1636
- "description": {
1637
- "type": "string",
1638
- "description": "Description of the step."
1639
- },
1640
- "action": {
1641
- "type": "string",
1642
- "const": "startRecording",
1643
- "description": "The action to perform."
1644
- },
1645
- "path": {
1646
- "type": "string",
1647
- "description": "File path of the recording. Supports the `.mp4`, `.webm`, and `.gif` extensions. If not specified, the file name is the ID of the step, and the extension is `.mp4`.",
1648
- "pattern": "([A-Za-z0-9_-]*\\.(mp4|webm|gif)$|\\$[A-Za-z0-9_]+)"
1649
- },
1650
- "directory": {
1651
- "type": "string",
1652
- "description": "Directory of the file. Attempts to create the directory if it doesn't exist."
1653
- },
1654
- "overwrite": {
1655
- "type": "boolean",
1656
- "description": "If `true`, overwrites the existing file at `path` if it exists.",
1657
- "default": false
1658
- }
1659
- },
1660
- "dynamicDefaults": {
1661
- "id": "uuid"
1662
- },
1663
- "required": [
1664
- "action"
1665
- ],
1666
- "additionalProperties": false,
1667
- "examples": [
1668
- {
1669
- "action": "startRecording"
1670
- },
1671
- {
1672
- "action": "startRecording",
1673
- "path": "results.mp4"
1674
- },
1675
- {
1676
- "action": "startRecording",
1677
- "path": "results.mp4",
1678
- "directory": "static/media",
1679
- "overwrite": true
1680
- }
1681
- ]
1682
- },
1683
- {
1684
- "title": "stopRecording",
1685
- "type": "object",
1686
- "description": "Stop the current recording.",
1687
- "properties": {
1688
- "id": {
1689
- "type": "string",
1690
- "description": "ID of the step."
1691
- },
1692
- "description": {
1693
- "type": "string",
1694
- "description": "Description of the step."
1695
- },
1696
- "action": {
1697
- "type": "string",
1698
- "const": "stopRecording",
1699
- "description": "The action to perform."
1700
- }
1701
- },
1702
- "dynamicDefaults": {
1703
- "id": "uuid"
1704
- },
1705
- "required": [
1706
- "action"
1707
- ],
1708
- "additionalProperties": false,
1709
- "examples": [
1710
- {
1711
- "action": "stopRecording"
1712
- }
1713
- ]
1714
- },
1715
- {
1716
- "title": "typeKeys",
1717
- "type": "object",
1718
- "description": "Type keys. To type special keys, begin and end the string with `$` and use the special key's enum. For example, to type the Escape key, enter `$ESCAPE$`.",
1719
- "properties": {
1720
- "id": {
1721
- "type": "string",
1722
- "description": "ID of the step."
1723
- },
1724
- "description": {
1725
- "type": "string",
1726
- "description": "Description of the step."
1727
- },
1728
- "action": {
1729
- "type": "string",
1730
- "const": "typeKeys",
1731
- "description": "The action to perform."
1732
- },
1733
- "keys": {
1734
- "description": "String of keys to enter.",
1735
- "anyOf": [
1736
- {
1737
- "type": "string"
1738
- },
1739
- {
1740
- "type": "array",
1741
- "items": {
1742
- "oneOf": [
1743
- {
1744
- "type": "string"
1745
- }
1746
- ]
1747
- }
1748
- }
1749
- ]
1750
- },
1751
- "delay": {
1752
- "type": "number",
1753
- "description": "Delay in milliseconds between each key press. Only valid during a recording.",
1754
- "default": 100
1755
- }
1756
- },
1757
- "dynamicDefaults": {
1758
- "id": "uuid"
1759
- },
1760
- "required": [
1761
- "action",
1762
- "keys"
1763
- ],
1764
- "additionalProperties": false,
1765
- "examples": [
1766
- {
1767
- "action": "typeKeys",
1768
- "keys": "kittens"
1769
- },
1770
- {
1771
- "action": "typeKeys",
1772
- "keys": [
1773
- "$ENTER$"
1774
- ]
1775
- },
1776
- {
1777
- "action": "typeKeys",
1778
- "keys": [
1779
- "kittens",
1780
- "$ENTER$"
1781
- ],
1782
- "delay": 500
1783
- }
1784
- ]
1785
- },
1786
- {
1787
- "title": "wait",
1788
- "type": "object",
1789
- "description": "Pause before performing the next action.",
1790
- "properties": {
1791
- "id": {
1792
- "type": "string",
1793
- "description": "ID of the step."
1794
- },
1795
- "description": {
1796
- "type": "string",
1797
- "description": "Description of the step."
1798
- },
1799
- "action": {
1800
- "type": "string",
1801
- "const": "wait",
1802
- "description": "The action to perform."
1803
- },
1804
- "duration": {
1805
- "type": "number",
1806
- "description": "Milliseconds to wait.",
1807
- "default": 5000
1808
- }
1809
- },
1810
- "dynamicDefaults": {
1811
- "id": "uuid"
1812
- },
1813
- "required": [
1814
- "action"
1815
- ],
1816
- "additionalProperties": false,
1817
- "examples": [
1818
- {
1819
- "action": "wait"
1820
- },
1821
- {
1822
- "action": "wait",
1823
- "duration": 5000
1824
- }
1825
- ]
1826
- }
1827
- ]
1828
- }
1829
- }
1830
- },
1831
- "required": [
1832
- "name",
1833
- "regex"
1834
- ]
1835
- }
1836
- ]
1837
- }
1838
- }
1839
- },
1840
- "required": [
1841
- "extensions",
1842
- "testStartStatementOpen",
1843
- "testStartStatementClose",
1844
- "testIgnoreStatement",
1845
- "testEndStatement",
1846
- "stepStatementOpen",
1847
- "stepStatementClose",
1848
- "markup"
1849
- ]
1850
- }
1851
- ]
1852
- },
1853
- "default": [
1854
- {
1855
- "name": "Markdown",
1856
- "extensions": [
1857
- ".md",
1858
- ".markdown",
1859
- ".mdx"
1860
- ],
1861
- "testStartStatementOpen": "[comment]: # (test start",
1862
- "testStartStatementClose": ")",
1863
- "testIgnoreStatement": "[comment]: # (test ignore)",
1864
- "testEndStatement": "[comment]: # (test end)",
1865
- "stepStatementOpen": "[comment]: # (step",
1866
- "stepStatementClose": ")",
1867
- "markup": [
1868
- {
1869
- "name": "onscreenText",
1870
- "regex": [
1871
- "\\*\\*.+?\\*\\*"
1872
- ],
1873
- "actions": [
1874
- "find"
1875
- ]
1876
- },
1877
- {
1878
- "name": "emphasis",
1879
- "regex": [
1880
- "(?<!\\*)\\*(?!\\*).+?(?<!\\*)\\*(?!\\*)"
1881
- ]
1882
- },
1883
- {
1884
- "name": "image",
1885
- "regex": [
1886
- "!\\[.+?\\]\\(.+?\\)"
1887
- ],
1888
- "actions": [
1889
- "checkLink"
1890
- ]
1891
- },
1892
- {
1893
- "name": "hyperlink",
1894
- "regex": [
1895
- "(?<!!)\\[.+?\\]\\(.+?\\)"
1896
- ],
1897
- "actions": [
1898
- "checkLink"
1899
- ]
1900
- },
1901
- {
1902
- "name": "navigationLink",
1903
- "regex": [
1904
- "(?:[Cc]hose|[Oo]pen|[Cc]lick|[Nn]avigate to|[Gg]o to)(?<!!)\\[.+?\\]\\(.+?\\)"
1905
- ],
1906
- "actions": [
1907
- "goTo"
1908
- ]
1909
- },
1910
- {
1911
- "name": "orderedList",
1912
- "regex": [
1913
- "(?<=\n) *?[0-9][0-9]?[0-9]?.\\s*.*"
1914
- ]
1915
- },
1916
- {
1917
- "name": "unorderedList",
1918
- "regex": [
1919
- "(?<=\n) *?\\*.\\s*.*",
1920
- "(?<=\n) *?-.\\s*.*"
1921
- ]
1922
- },
1923
- {
1924
- "name": "codeInline",
1925
- "regex": [
1926
- "(?<!`)`(?!`).+?(?<!`)`(?!`)"
1927
- ]
1928
- },
1929
- {
1930
- "name": "interaction",
1931
- "regex": [
1932
- "[cC]lick",
1933
- "[tT]ap",
1934
- "[tT]ouch",
1935
- "[sS]elect",
1936
- "[cC]hoose",
1937
- "[tT]oggle",
1938
- "[eE]nable",
1939
- "[dD]isable",
1940
- "[tT]urn [oO][ff|n]",
1941
- "[tT]ype",
1942
- "[eE]nter",
1943
- "[sS]end",
1944
- "[aA]dd",
1945
- "[rR]emove",
1946
- "[dD]elete",
1947
- "[uU]pload",
1948
- "[dD]ownload",
1949
- "[sS]croll",
1950
- "[sS]earch",
1951
- "[fF]ilter",
1952
- "[sS]ort",
1953
- "[cC]opy",
1954
- "[pP]aste",
1955
- "[cC]ut",
1956
- "[rR]eplace",
1957
- "[cC]lear",
1958
- "[rR]efresh",
1959
- "[rR]evert",
1960
- "[rR]estore",
1961
- "[rR]eset",
1962
- "[lL]ogin",
1963
- "[lL]ogout",
1964
- "[sS]ign [iI]n",
1965
- "[sS]ign [oO]ut",
1966
- "[sS]ubmit",
1967
- "[cC]ancel",
1968
- "[cC]lose",
1969
- "[aA]ccept",
1970
- "[dD]ecline",
1971
- "[dD]eny",
1972
- "[rR]eject",
1973
- "[rR]etry",
1974
- "[rR]estart",
1975
- "[rR]esume"
1976
- ]
1977
- }
1978
- ]
1979
- },
1980
- {
1981
- "name": "AsciiDoc",
1982
- "extensions": [
1983
- ".adoc",
1984
- ".asciidoc, .asc"
1985
- ],
1986
- "testStartStatementOpen": "// (test start",
1987
- "testStartStatementClose": ")",
1988
- "testIgnoreStatement": "// (test ignore)",
1989
- "testEndStatement": "// (test end)",
1990
- "stepStatementOpen": "// (step",
1991
- "stepStatementClose": ")",
1992
- "markup": []
1993
- },
1994
- {
1995
- "name": "HTML/XML",
1996
- "extensions": [
1997
- ".html",
1998
- ".htm",
1999
- ".xml",
2000
- ".xhtml"
2001
- ],
2002
- "testStartStatementOpen": "<!-- test start",
2003
- "testStartStatementClose": "-->",
2004
- "testIgnoreStatement": "<!-- test ignore -->",
2005
- "testEndStatement": "<!-- test end -->",
2006
- "stepStatementOpen": "<!-- step",
2007
- "stepStatementClose": "-->",
2008
- "markup": []
2009
- }
2010
- ]
2011
- },
2012
- "integrations": {
2013
- "description": "Options for connecting to external services.",
2014
- "type": "object",
2015
- "additionalProperties": false,
2016
- "properties": {
2017
- "openApi": {
2018
- "type": "array",
2019
- "items": {
2020
- "allOf": [
2021
- {
2022
- "version": "1.0.0",
2023
- "$schema": "http://json-schema.org/draft-07/schema#",
2024
- "title": "openApi",
2025
- "type": "object",
2026
- "description": "OpenAPI definition and configuration.",
2027
- "additionalProperties": false,
2028
- "properties": {
2029
- "name": {
2030
- "type": "string",
2031
- "description": "Name of the OpenAPI definition, as defined in your configuration."
2032
- },
2033
- "descriptionPath": {
2034
- "type": "string",
2035
- "description": "URL or local path to the OpenAPI definition."
2036
- },
2037
- "operationId": {
2038
- "type": "string",
2039
- "description": "ID of the operation to use for the request."
2040
- },
2041
- "server": {
2042
- "type": "string",
2043
- "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 definition."
2044
- },
2045
- "validateAgainstSchema": {
2046
- "type": "string",
2047
- "description": "Validates the request and/or response against the schema in the OpenAPI definition. If the request or response doesn't match the schema, the step fails.",
2048
- "enum": [
2049
- "request",
2050
- "response",
2051
- "both",
2052
- "none"
2053
- ],
2054
- "default": "both"
2055
- },
2056
- "mockResponse": {
2057
- "type": "boolean",
2058
- "description": "If `true`, doesn't make the HTTP request, but instead uses the response example or schema from the OpenAPI definition 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."
2059
- },
2060
- "statusCode": {
2061
- "type": "integer",
2062
- "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."
2063
- },
2064
- "useExample": {
2065
- "type": [
2066
- "string"
2067
- ],
2068
- "description": "Uses the example from the OpenAPI definition 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.",
2069
- "enum": [
2070
- "request",
2071
- "response",
2072
- "both",
2073
- "none"
2074
- ],
2075
- "default": "none"
2076
- },
2077
- "exampleKey": {
2078
- "type": "string",
2079
- "description": "Key of the example to use from the `examples` property in the OpenAPI definition. If an `examples` key isn't specified or isn't available for a given parameter or object, the `example` property value is used.",
2080
- "default": ""
2081
- },
2082
- "requestHeaders": {
2083
- "type": "object",
2084
- "description": "Request headers to add to the request. If specified in both a config and a step, the step value overrides the config value.",
2085
- "additionalProperties": {
2086
- "type": "string"
2087
- }
2088
- }
2089
- },
2090
- "examples": [
2091
- {
2092
- "descriptionPath": "https://petstore.swagger.io/v2/swagger.json"
2093
- }
2094
- ]
2095
- },
2096
- {
2097
- "type": "object",
2098
- "properties": {
2099
- "operationId": {
2100
- "type": "null",
2101
- "$commment": "Only allow operationId at the step level."
2102
- }
2103
- },
2104
- "required": [
2105
- "name",
2106
- "descriptionPath"
2107
- ]
2108
- }
2109
- ]
2110
- }
2111
- }
2112
- }
2113
- },
2114
- "telemetry": {
2115
- "description": "Options around sending telemetry for Doc Detective usage.",
2116
- "type": "object",
2117
- "additionalProperties": false,
2118
- "properties": {
2119
- "send": {
2120
- "description": "If `true`, sends Doc Detective telemetry.",
2121
- "type": "boolean",
2122
- "default": true
2123
- },
2124
- "userId": {
2125
- "description": "Identifier for the organization, group, or individual running Doc Detective.",
2126
- "type": "string"
2127
- }
2128
- },
2129
- "required": [
2130
- "send"
2131
- ],
2132
- "default": {
2133
- "send": true
2134
- }
2135
- },
2136
- "logLevel": {
2137
- "description": "Amount of detail to output when performing an operation.",
2138
- "type": "string",
2139
- "enum": [
2140
- "silent",
2141
- "error",
2142
- "warning",
2143
- "info",
2144
- "debug"
2145
- ],
2146
- "default": "info"
2147
- }
2148
- },
2149
- "definitions": {
2150
- "input": {
2151
- "description": "Path(s) to test specifications and documentation source files. May be paths to specific files or to directories to scan for files.",
2152
- "anyOf": [
2153
- {
2154
- "type": "string"
2155
- },
2156
- {
2157
- "type": "array",
2158
- "items": {
2159
- "anyOf": [
2160
- {
2161
- "type": "string"
2162
- }
2163
- ]
2164
- }
2165
- }
2166
- ]
2167
- },
2168
- "recursive": {
2169
- "description": "If `true` searches `input`, `setup`, and `cleanup` paths recursively for test specificaions and source files.",
2170
- "type": "boolean"
2171
- },
2172
- "output": {
2173
- "description": "Path of the of the file or directory in which to store the output of Doc Detective commands. If a file path is specified, the output is written to that file. If a file of that name already exists, Doc Detective creates appends an integer to the result file name. If a directory path is specified, the output file name is dependent on the command being run.",
2174
- "type": "string",
2175
- "default": "."
2176
- },
2177
- "markupToInclude": {
2178
- "description": "Markup types to include when performing this operation. If no markup types are specified, the operation includes all markup types as defined in `fileTypes`.",
2179
- "type": "array",
2180
- "items": {
2181
- "oneOf": [
2182
- {
2183
- "type": "string"
2184
- }
2185
- ]
2186
- }
2187
- }
2188
- },
2189
- "examples": [
2190
- {},
2191
- {
2192
- "input": ".",
2193
- "output": "."
2194
- },
2195
- {
2196
- "defaultCommand": "runTests",
2197
- "envVariables": "",
2198
- "input": ".",
2199
- "output": ".",
2200
- "recursive": true,
2201
- "logLevel": "info",
2202
- "runTests": {
2203
- "input": ".",
2204
- "output": ".",
2205
- "setup": "",
2206
- "cleanup": "",
2207
- "recursive": true,
2208
- "downloadDirectory": ".",
2209
- "contexts": [
2210
- {
2211
- "app": {
2212
- "name": "firefox",
2213
- "path": ""
2214
- },
2215
- "platforms": [
2216
- "linux",
2217
- "mac",
2218
- "windows"
2219
- ]
2220
- }
2221
- ]
2222
- }
2223
- },
2224
- {
2225
- "integrations": {
2226
- "openApi": [
2227
- {
2228
- "name": "Acme",
2229
- "descriptionPath": "https://www.acme.com/openapi.json",
2230
- "server": "https://api.acme.com",
2231
- "mockResponse": true
2232
- }
2233
- ]
2234
- }
2235
- },
2236
- {
2237
- "envVariables": "",
2238
- "input": ".",
2239
- "output": ".",
2240
- "recursive": true,
2241
- "logLevel": "info",
2242
- "runTests": {
2243
- "input": ".",
2244
- "output": ".",
2245
- "setup": "",
2246
- "cleanup": "",
2247
- "recursive": true,
2248
- "downloadDirectory": ".",
2249
- "contexts": [
2250
- {
2251
- "app": {
2252
- "name": "firefox",
2253
- "path": ""
2254
- },
2255
- "platforms": [
2256
- "linux",
2257
- "mac",
2258
- "windows"
2259
- ]
2260
- }
2261
- ]
2262
- },
2263
- "runCoverage": {
2264
- "recursive": true,
2265
- "input": ".",
2266
- "output": ".",
2267
- "markup": []
2268
- },
2269
- "fileTypes": [
2270
- {
2271
- "name": "Markdown",
2272
- "extensions": [
2273
- ".md",
2274
- ".markdown",
2275
- ".mdx"
2276
- ],
2277
- "testStartStatementOpen": "[comment]: # (test start",
2278
- "testStartStatementClose": ")",
2279
- "testIgnoreStatement": "[comment]: # (test ignore)",
2280
- "testEndStatement": "[comment]: # (test end)",
2281
- "stepStatementOpen": "[comment]: # (step",
2282
- "stepStatementClose": ")",
2283
- "markup": [
2284
- {
2285
- "name": "onscreenText",
2286
- "regex": [
2287
- "\\*\\*.+?\\*\\*"
2288
- ],
2289
- "actions": [
2290
- "find"
2291
- ]
2292
- },
2293
- {
2294
- "name": "emphasis",
2295
- "regex": [
2296
- "(?<!\\*)\\*(?!\\*).+?(?<!\\*)\\*(?!\\*)"
2297
- ]
2298
- },
2299
- {
2300
- "name": "image",
2301
- "regex": [
2302
- "!\\[.+?\\]\\(.+?\\)"
2303
- ],
2304
- "actions": [
2305
- "checkLink"
2306
- ]
2307
- },
2308
- {
2309
- "name": "hyperlink",
2310
- "regex": [
2311
- "(?<!!)\\[.+?\\]\\(.+?\\)"
2312
- ],
2313
- "actions": [
2314
- "checkLink"
2315
- ]
2316
- },
2317
- {
2318
- "name": "navigationLink",
2319
- "regex": [
2320
- "(?:[Cc]hose|[Oo]pen|[Cc]lick|[Nn]avigate to|[Gg]o to)(?<!!)\\[.+?\\]\\(.+?\\)"
2321
- ],
2322
- "actions": [
2323
- "goTo"
2324
- ]
2325
- },
2326
- {
2327
- "name": "orderedList",
2328
- "regex": [
2329
- "(?<=\n) *?[0-9][0-9]?[0-9]?.\\s*.*"
2330
- ]
2331
- },
2332
- {
2333
- "name": "unorderedList",
2334
- "regex": [
2335
- "(?<=\n) *?\\*.\\s*.*",
2336
- "(?<=\n) *?-.\\s*.*"
2337
- ]
2338
- },
2339
- {
2340
- "name": "codeInline",
2341
- "regex": [
2342
- "(?<!`)`(?!`).+?(?<!`)`(?!`)"
2343
- ]
2344
- },
2345
- {
2346
- "name": "codeBlock",
2347
- "regex": [
2348
- "(?=(```))(\\w|\\W)*(?<=```)"
2349
- ]
2350
- },
2351
- {
2352
- "name": "interaction",
2353
- "regex": [
2354
- "[cC]lick",
2355
- "[tT]ap",
2356
- "[tT]ouch",
2357
- "[sS]elect",
2358
- "[cC]hoose",
2359
- "[tT]oggle",
2360
- "[eE]nable",
2361
- "[dD]isable",
2362
- "[tT]urn [oO][ff|n]",
2363
- "[tT]ype",
2364
- "[eE]nter",
2365
- "[sS]end",
2366
- "[aA]dd",
2367
- "[rR]emove",
2368
- "[dD]elete",
2369
- "[uU]pload",
2370
- "[dD]ownload",
2371
- "[sS]croll",
2372
- "[sS]earch",
2373
- "[fF]ilter",
2374
- "[sS]ort",
2375
- "[cC]opy",
2376
- "[pP]aste",
2377
- "[cC]ut",
2378
- "[rR]eplace",
2379
- "[cC]lear",
2380
- "[rR]efresh",
2381
- "[rR]evert",
2382
- "[rR]estore",
2383
- "[rR]eset",
2384
- "[lL]ogin",
2385
- "[lL]ogout",
2386
- "[sS]ign [iI]n",
2387
- "[sS]ign [oO]ut",
2388
- "[sS]ubmit",
2389
- "[cC]ancel",
2390
- "[cC]lose",
2391
- "[aA]ccept",
2392
- "[dD]ecline",
2393
- "[dD]eny",
2394
- "[rR]eject",
2395
- "[rR]etry",
2396
- "[rR]estart",
2397
- "[rR]esume"
2398
- ]
2399
- }
2400
- ]
2401
- }
2402
- ],
2403
- "integrations": {},
2404
- "telemetry": {
2405
- "send": true,
2406
- "userId": "Doc Detective"
2407
- }
2408
- },
2409
- {
2410
- "envVariables": "",
2411
- "input": [
2412
- "."
2413
- ],
2414
- "output": ".",
2415
- "recursive": true,
2416
- "relativePathBase": "cwd",
2417
- "logLevel": "info",
2418
- "runTests": {
2419
- "input": [
2420
- "."
2421
- ],
2422
- "output": ".",
2423
- "setup": [
2424
- "."
2425
- ],
2426
- "cleanup": [
2427
- "."
2428
- ],
2429
- "recursive": true,
2430
- "downloadDirectory": ".",
2431
- "contexts": [
2432
- {
2433
- "app": {
2434
- "name": "firefox",
2435
- "options": {
2436
- "width": 1200,
2437
- "height": 800,
2438
- "headless": true
2439
- }
2440
- },
2441
- "platforms": [
2442
- "linux",
2443
- "mac",
2444
- "windows"
2445
- ]
2446
- }
2447
- ]
2448
- },
2449
- "runCoverage": {
2450
- "recursive": true,
2451
- "input": [
2452
- "."
2453
- ],
2454
- "output": ".",
2455
- "markup": []
2456
- },
2457
- "fileTypes": [
2458
- {
2459
- "name": "Markdown",
2460
- "extensions": [
2461
- ".md",
2462
- ".markdown",
2463
- ".mdx"
2464
- ],
2465
- "testStartStatementOpen": "[comment]: # (test start",
2466
- "testStartStatementClose": ")",
2467
- "testIgnoreStatement": "[comment]: # (test ignore)",
2468
- "testEndStatement": "[comment]: # (test end)",
2469
- "stepStatementOpen": "[comment]: # (step",
2470
- "stepStatementClose": ")",
2471
- "markup": [
2472
- {
2473
- "name": "onscreenText",
2474
- "regex": [
2475
- "\\*\\*.+?\\*\\*"
2476
- ],
2477
- "actions": [
2478
- "find"
2479
- ]
2480
- },
2481
- {
2482
- "name": "emphasis",
2483
- "regex": [
2484
- "(?<!\\*)\\*(?!\\*).+?(?<!\\*)\\*(?!\\*)"
2485
- ]
2486
- },
2487
- {
2488
- "name": "image",
2489
- "regex": [
2490
- "!\\[.+?\\]\\(.+?\\)"
2491
- ],
2492
- "actions": [
2493
- "checkLink"
2494
- ]
2495
- },
2496
- {
2497
- "name": "hyperlink",
2498
- "regex": [
2499
- "(?<!!)\\[.+?\\]\\(.+?\\)"
2500
- ],
2501
- "actions": [
2502
- "checkLink"
2503
- ]
2504
- },
2505
- {
2506
- "name": "navigationLink",
2507
- "regex": [
2508
- "(?:[Cc]hose|[Oo]pen|[Cc]lick|[Nn]avigate to|[Gg]o to)(?<!!)\\[.+?\\]\\(.+?\\)"
2509
- ],
2510
- "actions": [
2511
- "goTo"
2512
- ]
2513
- },
2514
- {
2515
- "name": "orderedList",
2516
- "regex": [
2517
- "(?<=\n) *?[0-9][0-9]?[0-9]?.\\s*.*"
2518
- ]
2519
- },
2520
- {
2521
- "name": "unorderedList",
2522
- "regex": [
2523
- "(?<=\n) *?\\*.\\s*.*",
2524
- "(?<=\n) *?-.\\s*.*"
2525
- ]
2526
- },
2527
- {
2528
- "name": "codeInline",
2529
- "regex": [
2530
- "(?<!`)`(?!`).+?(?<!`)`(?!`)"
2531
- ]
2532
- },
2533
- {
2534
- "name": "codeBlock",
2535
- "regex": [
2536
- "(?=(```))(\\w|\\W)*(?<=```)"
2537
- ]
2538
- },
2539
- {
2540
- "name": "interaction",
2541
- "regex": [
2542
- "[cC]lick",
2543
- "[tT]ap",
2544
- "[tT]ouch",
2545
- "[sS]elect",
2546
- "[cC]hoose",
2547
- "[tT]oggle",
2548
- "[eE]nable",
2549
- "[dD]isable",
2550
- "[tT]urn [oO][ff|n]",
2551
- "[tT]ype",
2552
- "[eE]nter",
2553
- "[sS]end",
2554
- "[aA]dd",
2555
- "[rR]emove",
2556
- "[dD]elete",
2557
- "[uU]pload",
2558
- "[dD]ownload",
2559
- "[sS]croll",
2560
- "[sS]earch",
2561
- "[fF]ilter",
2562
- "[sS]ort",
2563
- "[cC]opy",
2564
- "[pP]aste",
2565
- "[cC]ut",
2566
- "[rR]eplace",
2567
- "[cC]lear",
2568
- "[rR]efresh",
2569
- "[rR]evert",
2570
- "[rR]estore",
2571
- "[rR]eset",
2572
- "[lL]ogin",
2573
- "[lL]ogout",
2574
- "[sS]ign [iI]n",
2575
- "[sS]ign [oO]ut",
2576
- "[sS]ubmit",
2577
- "[cC]ancel",
2578
- "[cC]lose",
2579
- "[aA]ccept",
2580
- "[dD]ecline",
2581
- "[dD]eny",
2582
- "[rR]eject",
2583
- "[rR]etry",
2584
- "[rR]estart",
2585
- "[rR]esume"
2586
- ]
2587
- }
2588
- ]
2589
- },
2590
- {
2591
- "name": "AsciiDoc",
2592
- "extensions": [
2593
- ".adoc",
2594
- ".asciidoc, .asc"
2595
- ],
2596
- "testStartStatementOpen": "// (test start",
2597
- "testStartStatementClose": ")",
2598
- "testIgnoreStatement": "// (test ignore)",
2599
- "testEndStatement": "// (test end)",
2600
- "stepStatementOpen": "// (step",
2601
- "stepStatementClose": ")",
2602
- "markup": []
2603
- },
2604
- {
2605
- "name": "HTML/XML",
2606
- "extensions": [
2607
- ".html",
2608
- ".htm",
2609
- ".xml",
2610
- ".xhtml"
2611
- ],
2612
- "testStartStatementOpen": "<!-- test start",
2613
- "testStartStatementClose": "-->",
2614
- "testIgnoreStatement": "<!-- test ignore -->",
2615
- "testEndStatement": "<!-- test end -->",
2616
- "stepStatementOpen": "<!-- step",
2617
- "stepStatementClose": "-->",
2618
- "markup": []
2619
- }
2620
- ],
2621
- "integrations": {},
2622
- "telemetry": {
2623
- "send": true,
2624
- "userId": "Doc Detective"
2625
- }
2626
- }
2627
- ]
2628
- }