jsdoc-rest-api v3.6.3 generates a map of REST API endpoints from JSDoc annotations and automatically attaches them to an Express.js app. It reads source files with custom tags like @apiType, @apiPath, @apiBody, @apiKey, and @apiDescription, producing route registrations so developers never need to write app.get(), app.post(), etc. The package exports two functions: generateRoutes() returns the route map, and attachExpressAppEndpoints() binds them to an Express instance. It is a niche automation tool for Node.js/Express projects using JSDoc comments; updates are infrequent (last release 2020).
npm install jsdoc-rest-apiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes Express, attaches endpoints from JSDoc-annotated controller files, and starts the server.
Write @apiBody as a JSON-like string, e.g., @apiBody {"title": "String"}. Validate that the library parses it correctly.Ensure @apiPath is like /api/resource/:id, not api/resource/:id or /api/resource/{id}.Use attachExpressAppEndpoints() instead of manually calling generateRoutes() and wiring routes.
Use module.exports = MyController in your controller files.
Ensure the argument is `{ app: expressApp, source: 'path' }`.Verify the source path relative to the project root, e.g., 'api/controllers/**/*Controller.js'.
Check that @apiBody contains valid JSON-like string, e.g., @apiBody {"field": "String"}.