{"_id":"@adl3879/hono-docs","_rev":"2-26657e36befcc42f3d114e5019fcf683","name":"@adl3879/hono-docs","dist-tags":{"latest":"1.0.32"},"versions":{"1.0.31":{"name":"@adl3879/hono-docs","version":"1.0.31","keywords":["openapi","hono","typescript","documentation","cli","generator"],"license":"MIT","_id":"@adl3879/hono-docs@1.0.31","maintainers":[{"name":"adl3879","email":"oluwatoyosiadeleye4@gmail.com"}],"homepage":"https://github.com/adl3879/hono-docs#readme","bugs":{"url":"https://github.com/adl3879/hono-docs/issues"},"bin":{"hono-docs":"dist/cli/index.js"},"dist":{"shasum":"d6bb487def893739a9c002b7faa1f1dea6dd5940","tarball":"https://registry.npmjs.org/@adl3879/hono-docs/-/hono-docs-1.0.31.tgz","fileCount":9,"integrity":"sha512-qOnPmMFBEZw2UJifF6TjCSxLNyTVSiZtzWBooD6P+IsQweooERcn5qC3sEva6zvecVFi4tUunUJCSsTv+YdBsQ==","signatures":[{"sig":"MEYCIQDLzl2yOGEHFyTtPrnXp6M6hruhHowESe8lv6CHlydKIgIhAO8VoFleLkIZgwDLH6WU5Ca4ItYntrR6cYwblNRAkBmE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":125091},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":"./dist/index.js","./cli":"./dist/cli/index.js","./core":"./dist/core/index.js","./package.json":"./package.json"},"gitHead":"64cfe58fb8f7fd514923b00b4b2c88e931f3c70f","scripts":{"lint":"eslint . --ext .ts,.js","build":"tsup","prepare":"husky install"},"_npmUser":{"name":"adl3879","email":"oluwatoyosiadeleye4@gmail.com"},"repository":{"url":"git+https://github.com/adl3879/hono-docs.git","type":"git"},"_npmVersion":"11.1.0","description":"Auto-generate OpenAPI 3.0 spec from Hono route types","directories":{},"_nodeVersion":"22.14.0","dependencies":{"tsx":"^4.20.3","yargs":"^18.0.0","ts-morph":"^26.0.0","esbuild-register":"^3.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","husky":"^8.0.0","eslint":"^9.29.0","esbuild":"^0.25.5","globals":"^16.2.0","@eslint/js":"^9.29.0","typescript":"^5.8.3","@types/node":"^24.0.3","@types/yargs":"^17.0.33","openapi-types":"^12.1.3","standard-version":"^9.5.0","typescript-eslint":"^8.33.1","eslint-plugin-format":"^1.0.1","eslint-plugin-import":"^2.32.0","eslint-config-prettier":"^10.1.5","@typescript-eslint/parser":"^8.34.1","@typescript-eslint/eslint-plugin":"^8.34.1"},"_npmOperationalInternal":{"tmp":"tmp/hono-docs_1.0.31_1768434338739_0.21225028094282394","host":"s3://npm-registry-packages-npm-production"}},"1.0.32":{"name":"@adl3879/hono-docs","version":"1.0.32","description":"Auto-generate OpenAPI 3.0 spec from Hono route types","type":"module","repository":{"type":"git","url":"git+https://github.com/adl3879/hono-docs.git"},"bugs":{"url":"https://github.com/adl3879/hono-docs/issues"},"homepage":"https://github.com/adl3879/hono-docs#readme","keywords":["openapi","hono","typescript","documentation","cli","generator"],"license":"MIT","main":"dist/index.js","types":"dist/index.d.ts","bin":{"hono-docs":"dist/cli/index.js"},"exports":{".":"./dist/index.js","./core":"./dist/core/index.js","./cli":"./dist/cli/index.js","./package.json":"./package.json"},"scripts":{"build":"tsup","lint":"eslint . --ext .ts,.js","prepare":"husky install"},"publishConfig":{"access":"public"},"dependencies":{"esbuild-register":"^3.6.0","ts-morph":"^26.0.0","tsx":"^4.20.3","yargs":"^18.0.0"},"devDependencies":{"@eslint/js":"^9.29.0","@types/node":"^24.0.3","@types/yargs":"^17.0.33","@typescript-eslint/eslint-plugin":"^8.34.1","@typescript-eslint/parser":"^8.34.1","esbuild":"^0.25.5","eslint":"^9.29.0","eslint-config-prettier":"^10.1.5","eslint-plugin-format":"^1.0.1","eslint-plugin-import":"^2.32.0","globals":"^16.2.0","husky":"^8.0.0","openapi-types":"^12.1.3","standard-version":"^9.5.0","tsup":"^8.5.0","typescript":"^5.8.3","typescript-eslint":"^8.33.1"},"_id":"@adl3879/hono-docs@1.0.32","gitHead":"db6c43ef3ec176dd3254ba3ff0d123788bb467e2","_nodeVersion":"22.14.0","_npmVersion":"11.1.0","dist":{"integrity":"sha512-8iiVyl40Eiu4qvw9G5G4En4uBpFiQglec5kWHasAvuN45qRYIHiphZvJ738FuZtQ5LIPvK6W8o6wKGN0FPg+QA==","shasum":"571f4824a7d15cbdb247047853fa0f951bd6259d","tarball":"https://registry.npmjs.org/@adl3879/hono-docs/-/hono-docs-1.0.32.tgz","fileCount":9,"unpackedSize":127327,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFfShvWMBlRWCW0SyRSa3+pW3rO+ZmjTpoG56ldfPED1AiAXZp8pjtmRNQ55IGVP7ITR6k+01E4acgr+niWQzktkNA=="}]},"_npmUser":{"name":"adl3879","email":"oluwatoyosiadeleye4@gmail.com"},"directories":{},"maintainers":[{"name":"adl3879","email":"oluwatoyosiadeleye4@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/hono-docs_1.0.32_1768437708740_0.7976884403881153"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-14T23:45:38.682Z","modified":"2026-01-15T00:41:48.997Z","1.0.31":"2026-01-14T23:45:38.881Z","1.0.32":"2026-01-15T00:41:48.897Z"},"bugs":{"url":"https://github.com/adl3879/hono-docs/issues"},"license":"MIT","homepage":"https://github.com/adl3879/hono-docs#readme","keywords":["openapi","hono","typescript","documentation","cli","generator"],"repository":{"type":"git","url":"git+https://github.com/adl3879/hono-docs.git"},"description":"Auto-generate OpenAPI 3.0 spec from Hono route types","maintainers":[{"name":"adl3879","email":"oluwatoyosiadeleye4@gmail.com"}],"readme":"# @adl3879/hono-docs\r\n\r\nThis is a fork of [`@rcmade/hono-docs`](https://github.com/rcmade/hono-docs) that adds support for **JSDoc comments** to generate OpenAPI documentation.\r\n\r\nFor standard usage, architecture details, and configuration options, please refer to the [original repository](https://github.com/rcmade/hono-docs).\r\n\r\n---\r\n\r\n## Install\r\n\r\n```bash\r\nnpm install --save-dev @adl3879/hono-docs\r\n# or\r\npnpm add -D @adl3879/hono-docs\r\n```\r\n\r\n## Features: JSDoc Support\r\n\r\nIn addition to defining route metadata in the config file, you can now document your routes directly in your code using JSDoc. This allows you to keep your documentation close to your implementation.\r\n\r\n### 1. Configure `routesPath`\r\n\r\nIn your `hono-docs.ts` config, use `routesPath` to point to your route files. You don't need to define the `api` array manually if you use JSDoc.\r\n\r\n```ts\r\nimport { defineConfig } from \"@adl3879/hono-docs\";\r\n\r\nexport default defineConfig({\r\n  tsConfigPath: \"./tsconfig.json\",\r\n  openApi: {\r\n    openapi: \"3.0.0\",\r\n    info: { title: \"My API\", version: \"1.0.0\" },\r\n    servers: [{ url: \"http://localhost:3000/api\" }],\r\n  },\r\n  outputs: {\r\n    openApiJson: \"./openapi/openapi.json\",\r\n  },\r\n  // Point to your route files here\r\n  routesPath: [\"src/routes/userRoutes.ts\"],\r\n});\r\n```\r\n\r\n### 2. Add JSDoc to your routes\r\n\r\nThe first JSDoc block in the file must define the `@openapi` (Group Name) and `@apiPrefix`.\r\nSubsequent blocks define the routes using `@route`.\r\n\r\n```ts\r\nimport { Hono } from \"hono\";\r\n\r\n/**\r\n * @openapi User Routes\r\n * @apiPrefix /user\r\n */\r\nexport const userRoutes = new Hono()\r\n\r\n  /**\r\n   * @route POST /reset-password\r\n   * @summary Reset Password\r\n   * @description Reset password for the user\r\n   * @tags Auth\r\n   */\r\n  .post(\"/reset-password\", (c) => c.json({ success: true }));\r\n\r\nexport type AppType = typeof userRoutes;\r\n```\r\n\r\n## Features: Smart Caching\r\n\r\nTo speed up generation, this tool implements a smart caching system.\r\n\r\n- **How it works**: It calculates the SHA-256 hash of your input files (`appTypePath`).\r\n- **Cache Hit**: If a file hasn't changed since the last run (and the output already exists), the generator skips it.\r\n- **Cache Storage**: Cache data is stored in `node_modules/.cache/hono-docs/cache.json`.\r\n- **Force Regenerate**: To force a regeneration, simply delete the `node_modules/.cache` directory or run the clean command:\r\n  ```bash\r\n  npx @adl3879/hono-docs clean\r\n  ```\r\n\r\n## License\r\n\r\n[MIT](https://github.com/adl3879/hono-docs/blob/main/LICENSE)\r\n","readmeFilename":"README.md"}