Skip to main content

config

Configuration options for Doc Detective operations.

Fields

FieldTypeDescriptionDefault
configIdstringOptional. Identifier for the configuration.Generated UUID
inputunknownOptional. Path(s) to test specifications and documentation source files. May be paths to specific files or to directories to scan for files..
outputstringOptional. 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..
recursivebooleanOptional. If true searches input, setup, and cleanup paths recursively for test specifications and source files.true
relativePathBasestringOptional. Whether paths should be interpreted as relative to the current working directory (cwd) or to the file in which they're specified (file).

Accepted values: cwd, file
file
loadVariablesstringOptional. Load environment variables from the specified .env file.
originstringOptional. Default protocol and domain to use for relative URLs.
beforeAnyOne of
- string
- array of string
Optional. Path(s) to test specifications to perform before those specified by input. Useful for setting up testing environments.
afterAllOne of
- string
- array of string
Optional. Path(s) to test specifications to perform after those specified by input. Useful for cleaning up testing environments.
detectStepsbooleanOptional. Whether or not to detect steps in input files based on defined markup.true
logLevelstringOptional. Amount of detail to output when performing an operation.

Accepted values: silent, error, warning, info, debug
info
runOnarray of object(context)Optional. Contexts to run the test in. Overrides contexts defined at the config and spec levels.
fileTypesarray of
one of:
- string
- object
Optional. Configuration for file types and their markup detection.[]
integrationsobjectOptional. Options for connecting to external services.
integrations.openApiarray of unknownOptional. No description provided.
telemetryobjectOptional. Options around sending telemetry for Doc Detective usage.{"send":true}
telemetry.sendbooleanRequired. If true, sends Doc Detective telemetry.true
telemetry.userIdstringOptional. Identifier for the organization, group, or individual running Doc Detective.

Examples

{}
{
"input": ".",
"output": ".",
"recursive": true,
"loadVariables": ".env",
"fileTypes": [
"markdown"
]
}
{
"fileTypes": [
{
"extends": "markdown",
"extensions": [
"md",
"markdown",
"mdx"
],
"inlineStatements": {
"testStart": "<!--\\s*testStart\\s*(.*?)\\s*-->",
"testEnd": "<!-- testEnd -->",
"ignoreStart": "<!-- ignoreStart -->",
"ignoreEnd": "<!-- ignoreEnd -->",
"step": "<!--\\s*step\\s*(.*?)\\s*-->"
},
"markup": [
{
"name": "onscreenText",
"regex": "\\*\\*.+?\\*\\*",
"actions": "find"
}
]
}
]
}
{
"fileTypes": [
{
"name": "Jupyter Notebooks",
"extensions": "ipynb",
"runShell": {
"command": "jupyter",
"args": [
"nbconvert",
"--to",
"script",
"--execute",
"$1",
"--stdout"
]
}
},
{
"name": "JavaScript",
"extensions": "js",
"runShell": {
"command": "node $1"
}
},
{
"name": "Python",
"extensions": "py",
"runShell": {
"command": "python $1"
}
}
]
}