Configuration
Config File Resolution
OAPIEX looks for configuration files in the current working directory using these names:
oapiex.config.tsoapiex.config.jsoapiex.config.cjs
Example
js
import { defineConfig } from 'oapiex';
export default defineConfig({
outputFormat: 'json',
outputShape: 'openapi',
browser: 'puppeteer',
requestTimeout: 50000,
maxRedirects: 5,
userAgent:
'Mozilla/5.0 (X11; Linux x64) AppleWebKit/537.36 (KHTML, like Gecko) OpenApiExtractor/1.0.0',
retryCount: 3,
retryDelay: 1000,
puppeteer: {
headless: true,
args: ['--no-sandbox', '--disable-setuid-sandbox'],
},
happyDom: {
enableJavaScriptEvaluation: true,
suppressInsecureJavaScriptEnvironmentWarning: true,
},
});Supported Fields
outputFormat:pretty,json,jsoutputShape:raw,openapibrowser:axios,happy-dom,jsdom,puppeteerrequestTimeout: request and page timeout in millisecondsmaxRedirects: maximum redirect count for HTTP loadinguserAgent: user agent string used for remote requestsretryCount: retry count setting reserved for loaders that implement retriesretryDelay: retry delay in millisecondshappyDom: Happy DOM browser optionspuppeteer: Puppeteer launch options
Merge Behavior
Default settings are merged with the user config, and CLI overrides are applied last.