Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs/get-started/installation/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,27 @@ You should see output in the terminal indicating the progress and results of the

[![Sample test screenshot](./example.png)](./example.png)

## Environment Variables

You can customize Doc Detective's behavior with environment variables.

### DOC_DETECTIVE_API_URL

Override the default Doc Detective API endpoint. Use this for enterprise or custom API deployments.

Default: `https://api.doc-detective.com/v1`

Set the environment variable before running tests:

```bash
export DOC_DETECTIVE_API_URL=https://custom-api.example.com/v1
npx doc-detective --input sample.spec.json
```

This variable only works when you've set an API key with `integrations.docDetectiveApi.apiKey` in your config. When you set an API key, Doc Detective runs tests via the API instead of locally.

For more information, see the [configuration reference](/docs/references/schemas/config) and [integrations options](/docs/references/schemas/integrations-options).

## Next steps

Next up, take a look at some of the [concepts](/docs/get-started/concepts) native to Doc Detective, check out some of the guided [tutorials](/docs/category/tutorials), or explore how to write [tests](/docs/get-started/tests) and [actions](/docs/category/actions) to automate your documentation testing.
12 changes: 12 additions & 0 deletions docs/references/schemas/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ logLevel | string | Optional. Amount of detail to output when performing an oper
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. |
fileTypes | array of one of: string, object([File type (custom)](/docs/references/schemas/file-type-custom)), object([File type (executable)](/docs/references/schemas/file-type-executable)) | Optional. Configuration for file types and their markup detection. | ``["markdown","asciidoc","html","dita"]``
integrations | object([Integrations options](/docs/references/schemas/integrations-options)) | Optional. Options for connecting to external services. |
apiMaxWaitTime | integer | Optional. Maximum time in seconds to wait for API-based test execution to complete. Only applicable when `integrations.docDetectiveApi.apiKey` is configured. | `600`
telemetry | object([Telemetry options](/docs/references/schemas/telemetry-options)) | Optional. Options around sending telemetry for Doc Detective usage. | ``{"send":true}``
concurrentRunners | integer,boolean | Optional. Number of concurrent test runners. Set to true to use CPU core count (capped at 4).<br/><br/>Minimum: 1 | `1`
environment | object([Environment details](/docs/references/schemas/environment-details)) | ReadOnly. Environment information for the system running Doc Detective. |
Expand Down Expand Up @@ -157,3 +158,14 @@ debug | one of:<br/>- boolean<br/>- string | Optional. Enable debugging mode. `t
"debug": "stepThrough"
}
```

```json
{
"integrations": {
"docDetectiveApi": {
"apiKey": "your-api-key"
}
},
"apiMaxWaitTime": 300
}
```
10 changes: 10 additions & 0 deletions docs/references/schemas/integrations-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Options for connecting to external services.
Field | Type | Description | Default
:-- | :-- | :-- | :--
openApi | array of unknown | Optional. No description provided. |
docDetectiveApi | object | Optional. Configure Doc Detective to run tests via the Doc Detective API instead of locally. When an API key is provided, tests are executed on remote infrastructure. |
docDetectiveApi.apiKey | string | Required (if docDetectiveApi is used). API key for authenticating with the Doc Detective API. |

## Examples

Expand All @@ -20,3 +22,11 @@ openApi | array of unknown | Optional. No description provided. |
"openApi": []
}
```

```json
{
"docDetectiveApi": {
"apiKey": "your-api-key-here"
}
}
```
Loading