docfy lint
Controleert de kwaliteit van documentatie, niet alleen of ze aanwezig is. Vangt onvolledige ApiOperation-, ApiResponse- en ApiBody-decorators die check en coverage niet zouden signaleren.
Gebruik
bash
npx nestjs-docfy lint [options]Opties
| Option | Default | Description |
|---|---|---|
--root <path> | . | Project root directory |
--tsconfig <path> | auto-detected | Path to tsconfig.json |
--pattern <glob> | **/*.controller.ts | Glob pattern to find controllers |
--format <format> | ts | Docsbestandsformaat om naar te zoeken: ts of js |
--quiet | false | Suppress all output except errors |
Wat er gecontroleerd wordt
Voor elke methode die al aanwezig is in een docsbestand:
ApiOperationzondersummary- Endpoints met een
@Body()-parameter zonderApiResponse400 - Endpoints met een
@Body()-parameter zonderApiBodydescription
Controllers zonder companion-docsbestand, of methoden die nog helemaal niet gedocumenteerd zijn, worden overgelaten aan check; lint beoordeelt alleen de kwaliteit van wat er al staat.
Voorbeelduitvoer
text
✖ POST /users
Missing 400 response
✖ GET /users
Missing operation summary
✖ PATCH /users/:id
Missing request body description
✖ 3 issue(s) found.Sluit af met code 1 zodra een probleem gevonden wordt, gebouwd voor CI, net als check.
.github/workflows/*.yml
# GitHub Actions example
- name: Lint documentation quality
run: npx nestjs-docfy lint