Skip to content

Commit 423f23d

Browse files
Copilothawkeyexl
andcommitted
First implementation of schema reference builder changes for v3 schemas
Co-authored-by: hawkeyexl <[email protected]>
1 parent a19c782 commit 423f23d

File tree

16 files changed

+887
-138
lines changed

16 files changed

+887
-138
lines changed

.scripts/buildSchemaReferencesV3.js

Lines changed: 593 additions & 0 deletions
Large diffs are not rendered by default.

docs/references/schemas/checkLink.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77

88
Field | Type | Description | Default
99
:-- | :-- | :-- | :--
10-
url | string | Optional. URL to check. Can be a full URL or a path. If a path is provided, `origin` must be specified. |
11-
origin | string | Optional. Protocol and domain to navigate to. Prepended to `url`. |
12-
statusCodes | One of<br/>-&nbsp;integer<br/>-&nbsp;array of integer | Optional. Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails. | ``[200,301,302,307,308]``
10+
url | string | Required. URL to check. Can be a full URL or a path. If a path is provided, `origin` must be specified. |
11+
origin | string | Optional. Protocol and domain to navigate to. Prepended to `url`. |
12+
statusCodes | integer | Optional. No description provided. |
13+
statusCodes | array of integer | Optional. No description provided. |
1314

1415
## Examples
1516

docs/references/schemas/click.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Click or tap an element.
77

88
Field | Type | Description | Default
99
:-- | :-- | :-- | :--
10-
button | string | Optional. Kind of click to perform.<br/><br/>Accepted values: `left`, `right`, `middle` |
11-
elementText | string | Optional. Display text of the element to click. If combined with `selector`, the element must match both the text and the selector. |
12-
selector | string | Optional. Selector of the element to click. If combined with `elementText`, the element must match both the text and the selector. |
10+
button | string | Optional. Kind of click to perform.<br/><br/>Accepted values: `left`, `right`, `middle` |
11+
elementText | string | Optional. Display text of the element to click. If combined with `selector`, the element must match both the text and the selector. |
12+
selector | string | Optional. Selector of the element to click. If combined with `elementText`, the element must match both the text and the selector. |
1313

1414
## Examples
1515

docs/references/schemas/config.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,26 @@ Configuration options for Doc Detective operations.
77

88
Field | Type | Description | Default
99
:-- | :-- | :-- | :--
10-
configId | string | Optional. Identifier for the configuration. | Generated UUID
11-
input | unknown | Optional. Path(s) to test specifications and documentation source files. May be paths to specific files or to directories to scan for files. | `.`
12-
output | string | Optional. Path of the directory in which to store the output of Doc Detective commands. If a file path is specified, Doc Detective attempts to honor the file name specified, but file path behavior is controlled by the configured reporters. | `.`
13-
recursive | boolean | Optional. If `true` searches `input`, `setup`, and `cleanup` paths recursively for test specifications and source files. | `true`
14-
relativePathBase | string | Optional. Whether paths should be interpreted as relative to the current working directory (`cwd`) or to the file in which they're specified (`file`).<br/><br/>Accepted values: `cwd`, `file` | `file`
15-
loadVariables | string | Optional. Load environment variables from the specified `.env` file. |
16-
origin | string | Optional. Default protocol and domain to use for relative URLs. |
17-
beforeAny | One of<br/>-&nbsp;string<br/>-&nbsp;array of string | Optional. Path(s) to test specifications to perform before those specified by `input`. Useful for setting up testing environments. |
18-
afterAll | One of<br/>-&nbsp;string<br/>-&nbsp;array of string | Optional. Path(s) to test specifications to perform after those specified by `input`. Useful for cleaning up testing environments. |
19-
detectSteps | boolean | Optional. Whether or not to detect steps in input files based on defined markup. | `true`
20-
logLevel | string | Optional. Amount of detail to output when performing an operation.<br/><br/>Accepted values: `silent`, `error`, `warning`, `info`, `debug` | `info`
21-
runOn | array of object([context](/docs/references/schemas/context)) | Optional. Contexts to run the test in. Overrides contexts defined at the config and spec levels. |
22-
fileTypes | array of <br/>one of:<br/>- string<br/>-&nbsp;object([Custom](/docs/references/schemas/Custom))<br/>-&nbsp;object([Executable](/docs/references/schemas/Executable)) | Optional. Configuration for file types and their markup detection. | []
23-
integrations | object | Optional. Options for connecting to external services. |
24-
integrations.openApi | array of unknown | Optional. No description provided. |
25-
telemetry | object | Optional. Options around sending telemetry for Doc Detective usage. | ``{"send":true}``
26-
telemetry.send | boolean | Required. If `true`, sends Doc Detective telemetry. | `true`
27-
telemetry.userId | string | Optional. Identifier for the organization, group, or individual running Doc Detective. |
10+
configId | string | Optional. Identifier for the configuration. |
11+
input | unknown | Optional. Path(s) to test specifications and documentation source files. May be paths to specific files or to directories to scan for files. | `.`
12+
output | string | Optional. Path of the directory in which to store the output of Doc Detective commands. If a file path is specified, Doc Detective attempts to honor the file name specified, but file path behavior is controlled by the configured reporters. | `.`
13+
recursive | boolean | Optional. If `true` searches `input`, `setup`, and `cleanup` paths recursively for test specifications and source files. | `true`
14+
relativePathBase | string | Optional. Whether paths should be interpreted as relative to the current working directory (`cwd`) or to the file in which they're specified (`file`).<br/><br/>Accepted values: `cwd`, `file` | `file`
15+
loadVariables | string | Optional. Load environment variables from the specified `.env` file. |
16+
origin | string | Optional. Default protocol and domain to use for relative URLs. |
17+
beforeAny | string | Optional. No description provided. |
18+
beforeAny | array of string | Optional. No description provided. |
19+
afterAll | string | Optional. No description provided. |
20+
afterAll | array of string | Optional. No description provided. |
21+
detectSteps | boolean | Optional. Whether or not to detect steps in input files based on defined markup. | `true`
22+
logLevel | string | Optional. Amount of detail to output when performing an operation.<br/><br/>Accepted values: `silent`, `error`, `warning`, `info`, `debug` | `info`
23+
runOn | array of object([context](/docs/references/schemas/context)) | Optional. Contexts to run the test in. Overrides contexts defined at the config and spec levels. |
24+
fileTypes | array of <br/>one of:<br/>- string<br/>-&nbsp;object([Custom](/docs/references/schemas/Custom))<br/>-&nbsp;object([Executable](/docs/references/schemas/Executable)) | Optional. No description provided. |
25+
integrations | object | Optional. Options for connecting to external services. |
26+
integrations.openApi | array of unknown | Optional. No description provided. |
27+
telemetry | object | Optional. Options around sending telemetry for Doc Detective usage. | ``{"send":true}``
28+
telemetry.send | boolean | Required. If `true`, sends Doc Detective telemetry. | `true`
29+
telemetry.userId | string | Optional. Identifier for the organization, group, or individual running Doc Detective. |
2830

2931
## Examples
3032

docs/references/schemas/context.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,24 @@ A context in which to perform tests. If no contexts are specified but a context
77

88
Field | Type | Description | Default
99
:-- | :-- | :-- | :--
10-
contextId | string | Optional. Unique identifier for the context. | Generated UUID
11-
platforms | One of<br/>-&nbsp;string<br/>-&nbsp;array of string | Optional. Platforms to run tests on. |
12-
browsers | One of<br/>-&nbsp;string<br/>-&nbsp;object<br/>-&nbsp;array of <br/>&nbsp;&nbsp;one of:<br/>&nbsp;&nbsp;- string<br/>&nbsp;&nbsp;- object | Optional. Browsers to run tests on. |
13-
browsers.name | string | Required. Name of the browser.<br/><br/>Accepted values: `chrome`, `firefox`, `safari`, `webkit` |
14-
browsers.headless | boolean | Optional. If `true`, runs the browser in headless mode. | `true`
15-
browsers.window | object | Optional. Browser dimensions. |
16-
browsers.window.width | integer | Optional. Width of the browser window in pixels. |
17-
browsers.window.height | integer | Optional. Height of the browser window in pixels. |
18-
browsers.viewport | object | Optional. Viewport dimensions. |
19-
browsers.viewport.width | integer | Optional. Width of the viewport in pixels. |
20-
browsers.viewport.height | integer | Optional. Height of the viewport in pixels. |
10+
contextId | string | Optional. Unique identifier for the context. |
11+
platforms | string | Optional. No description provided.<br/><br/>Accepted values: `linux`, `mac`, `windows` |
12+
platforms | array of string | Optional. No description provided. |
13+
browsers | string | Optional. Name of the browser.<br/><br/>Accepted values: `chrome`, `firefox`, `safari`, `webkit` |
14+
browsers | object | Optional. Browser configuration. |
15+
browsers.name | string | Required. Name of the browser.<br/><br/>Accepted values: `chrome`, `firefox`, `safari`, `webkit` |
16+
browsers.headless | boolean | Optional. If `true`, runs the browser in headless mode. | `true`
17+
browsers.window | object | Optional. Browser dimensions. |
18+
browsers.window.width | integer | Optional. Width of the browser window in pixels. |
19+
browsers.window.height | integer | Optional. Height of the browser window in pixels. |
20+
browsers.viewport | object | Optional. Viewport dimensions. |
21+
browsers.viewport.width | integer | Optional. Width of the viewport in pixels. |
22+
browsers.viewport.height | integer | Optional. Height of the viewport in pixels. |
23+
browsers | array of <br/>one of:<br/>- string<br/>- object | Optional. No description provided. |
24+
browsers[].name | string | Required. Name of the browser.<br/><br/>Accepted values: `chrome`, `firefox`, `safari`, `webkit` |
25+
browsers[].headless | boolean | Optional. If `true`, runs the browser in headless mode. | `true`
26+
browsers[].window | object | Optional. Browser dimensions. |
27+
browsers[].viewport | object | Optional. Viewport dimensions. |
2128

2229
## Examples
2330

docs/references/schemas/find.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ Find an element based on display text or a selector, then optionally interact wi
77

88
Field | Type | Description | Default
99
:-- | :-- | :-- | :--
10-
elementText | string | Optional. Display text of the element to find. If combined with `selector`, the element must match both the text and the selector. |
11-
selector | string | Optional. Selector of the element to find. If combined with `elementText`, the element must match both the text and the selector. |
12-
timeout | integer | Optional. Max duration in milliseconds to wait for the element to exist. | `5000`
13-
moveTo | boolean | Optional. Move to the element. If the element isn't visible, it's scrolled into view. | `true`
14-
click | One of<br/>-&nbsp;object([click](/docs/references/schemas/click))<br/>-&nbsp;object | Optional. Click the element. |
15-
type | undefined | Optional. Type keys after finding the element. Either a string or an object with a `keys` field as defined in [`type`](type). To type in the element, make the element active with the `click` parameter. |
10+
elementText | string | Optional. Display text of the element to find. If combined with `selector`, the element must match both the text and the selector. |
11+
selector | string | Optional. Selector of the element to find. If combined with `elementText`, the element must match both the text and the selector. |
12+
timeout | integer | Optional. Max duration in milliseconds to wait for the element to exist. | `5000`
13+
moveTo | boolean | Optional. Move to the element. If the element isn't visible, it's scrolled into view. | `true`
14+
click | object([click](/docs/references/schemas/click)) | Optional. Click or tap an element. |
15+
click | object | Optional. No description provided. |
16+
click.button | string | Optional. Kind of click to perform.<br/><br/>Accepted values: `left`, `right`, `middle` |
17+
type | unknown | Optional. Type keys after finding the element. Either a string or an object with a `keys` field as defined in [`type`](type). To type in the element, make the element active with the `click` parameter. |
1618

1719
## Examples
1820

docs/references/schemas/goTo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
Field | Type | Description | Default
99
:-- | :-- | :-- | :--
10-
url | string | Optional. 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. |
11-
origin | string | Optional. Protocol and domain to navigate to. Prepended to `url`. |
10+
url | string | Required. 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. |
11+
origin | string | Optional. Protocol and domain to navigate to. Prepended to `url`. |
1212

1313
## Examples
1414

docs/references/schemas/httpRequest.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,27 @@ Perform a generic HTTP request, for example to an API.
77

88
Field | Type | Description | Default
99
:-- | :-- | :-- | :--
10-
url | string | Optional. URL for the HTTP request. |
11-
openApi | unknown | Optional. No description provided. |
12-
statusCodes | array of integer | Optional. Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails. | ``[200,201]``
13-
method | string | Optional. Method of the HTTP request<br/><br/>Accepted values: `get`, `put`, `post`, `patch`, `delete` | `get`
14-
timeout | integer | Optional. Timeout for the HTTP request, in milliseconds. | `60000`
15-
request | object | Optional. No description provided. |
16-
request.headers | object | Optional. Headers to include in the HTTP request, in key/value format. | ``{}``
17-
request.parameters | object | Optional. URL parameters to include in the HTTP request, in key/value format. | ``{}``
18-
request.body | One of<br/>-&nbsp;object<br/>-&nbsp;array of unknown<br/>-&nbsp;string | Optional. JSON object to include as the body of the HTTP request. | ``{}``
19-
response | object | Optional. No description provided. |
20-
response.headers | object | Optional. Headers expected in the response, in key/value format. If one or more `responseHeaders` entries aren't present in the response, the step fails. | ``{}``
21-
response.body | One of<br/>-&nbsp;object<br/>-&nbsp;array of unknown<br/>-&nbsp;string | Optional. JSON object expected in the response. If one or more key/value pairs aren't present in the response, the step fails. | ``{}``
22-
allowAdditionalFields | boolean | Optional. If `false`, the step fails when the response data contains fields not specified in the response body. | `true`
23-
path | string | Optional. File path to save the command's output, relative to `directory`. Specify a file extension that matches the expected response type, such as `.json` for JSON content or `.txt` for strings. |
24-
directory | string | Optional. 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. |
25-
maxVariation | number | Optional. Allowed variation in percentage of text different between the current output and previously saved output. If the difference between the current output and the previous output is greater than `maxVariation`, the step fails. If output doesn't exist at `path`, this value is ignored. | `0`
26-
overwrite | string | Optional. If `true`, overwrites the existing output at `path` if it exists.
10+
url | string | Optional. URL for the HTTP request. |
11+
openApi | unknown | Optional. No description provided. |
12+
statusCodes | array of integer | Optional. Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails. | ``[200,201]``
13+
method | string | Optional. Method of the HTTP request<br/><br/>Accepted values: `get`, `put`, `post`, `patch`, `delete` | `get`
14+
timeout | integer | Optional. Timeout for the HTTP request, in milliseconds. | `60000`
15+
request | object | Optional. No description provided. |
16+
request.headers | object | Optional. Headers to include in the HTTP request, in key/value format. | ``{}``
17+
request.parameters | object | Optional. URL parameters to include in the HTTP request, in key/value format. | ``{}``
18+
request.body | object | Optional. No description provided. |
19+
request.body | array of unknown | Optional. No description provided. |
20+
request.body | string | Optional. No description provided. |
21+
response | object | Optional. No description provided. |
22+
response.headers | object | Optional. Headers expected in the response, in key/value format. If one or more `responseHeaders` entries aren't present in the response, the step fails. | ``{}``
23+
response.body | object | Optional. No description provided. |
24+
response.body | array of unknown | Optional. No description provided. |
25+
response.body | string | Optional. No description provided. |
26+
allowAdditionalFields | boolean | Optional. If `false`, the step fails when the response data contains fields not specified in the response body. | `true`
27+
path | string | Optional. File path to save the command's output, relative to `directory`. Specify a file extension that matches the expected response type, such as `.json` for JSON content or `.txt` for strings. |
28+
directory | string | Optional. 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. |
29+
maxVariation | number | Optional. Allowed variation in percentage of text different between the current output and previously saved output. If the difference between the current output and the previous output is greater than `maxVariation`, the step fails. If output doesn't exist at `path`, this value is ignored. | `0`
30+
overwrite | string | Optional. If `true`, overwrites the existing output at `path` if it exists.
2731
If `aboveVariation`, overwrites the existing output at `path` if the difference between the new output and the existing output is greater than `maxVariation`.<br/><br/>Accepted values: `true`, `false`, `aboveVariation` | `aboveVariation`
2832

2933
## Examples

docs/references/schemas/record.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Start recording the current browser viewport. Must be followed by a `stopRecord`
77

88
Field | Type | Description | Default
99
:-- | :-- | :-- | :--
10-
path | string | Optional. 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`. |
11-
directory | string | Optional. Directory of the file. If the directory doesn't exist, creates the directory. |
12-
overwrite | string | Optional. If `true`, overwrites the existing recording at `path` if it exists.<br/><br/>Accepted values: `true`, `false` |
10+
path | string | Optional. 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`. |
11+
directory | string | Optional. Directory of the file. If the directory doesn't exist, creates the directory. |
12+
overwrite | string | Optional. If `true`, overwrites the existing recording at `path` if it exists.<br/><br/>Accepted values: `true`, `false` |
1313

1414
## Examples
1515

0 commit comments

Comments
 (0)