The JSDoc HTTP Plugin extends JSDoc's core functionality by introducing custom tags specifically designed for documenting HTTP endpoints in JavaScript projects. It is currently at version 0.3.2 and appears to be in a maintenance state, having been forked from an unmaintained project to continue its development. The plugin integrates seamlessly with the default JSDoc template, allowing developers to add structured documentation for API routes, including HTTP verbs, paths, and authentication requirements, using tags like `@path` and `@auth`. This differentiation makes it a valuable tool for projects that require comprehensive API documentation generated directly from source code comments, particularly for RESTful services built with frameworks like Express. The project's last publish was 6 years ago, suggesting a slow release cadence, primarily focused on stability and compatibility with JSDoc itself.
npm install jsdoc-http-pluginVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to install the JSDoc HTTP plugin, configure it in `jsdoc.conf.json`, and use the `@path`, `@auth`, and `@header` tags to document a simple HTTP POST endpoint in an `example.js` file. It then shows the command to generate the HTML documentation.
Modify your `jsdoc.conf` file to place the markdown plugin first: `"plugins": ["plugins/markdown", "jsdoc-http-plugin"]`.
Review the GitHub repository and npm page for recent activity and compatibility notes before integrating into critical projects. Consider alternative API documentation solutions if long-term, high-velocity maintenance is a strict requirement.
Ensure your project's `jsdoc` dependency aligns with the `jsdoc-http-plugin`'s peer dependency range. If upgrading JSDoc to a major new version, thoroughly test plugin functionality or check for a newer version of `jsdoc-http-plugin` that explicitly supports the new JSDoc major version.
Add `"jsdoc-http-plugin"` to the `plugins` array in your `jsdoc.conf.json` file. Ensure the plugin package is installed: `npm install jsdoc-http-plugin --save-dev`.
Verify that your `jsdoc.conf.json` `source.include` and `source.includePattern` options correctly cover the files where your HTTP endpoints are documented. Also, ensure each `@path` tag is preceded by a `@name` tag for JSDoc to properly recognize and render the documentation entry.
Adjust the order of plugins in your `jsdoc.conf` file to ensure the Markdown plugin is processed first: `"plugins": ["plugins/markdown", "jsdoc-http-plugin"]`.