Installation
Install the Package
Choose your preferred package manager:
bash
npm install -D autoswagbash
pnpm add -D autoswagbash
yarn add -D autoswagTypeScript Configuration
Autoswag reads your tsconfig.json automatically. No special configuration is required:
json
{
"compilerOptions": {
"target": "ES2020",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"resolveJsonModule": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}Important
If you use path aliases (like @/*), Autoswag will respect them from your tsconfig.json paths configuration.
TIP
TypeScript configuration used by Autoswag can be overridden in the config. See compilerOptions
Next Steps
Now that installation is complete:
- Quick Start → - Generate your first OpenAPI document
- Configuration → - Learn about all configuration options
Or jump straight to the JSDoc Tags reference → to learn how to document endpoints.