{"id":26930348,"url":"https://github.com/blobbybilb/why-doc","last_synced_at":"2026-01-12T06:46:39.076Z","repository":{"id":173759541,"uuid":"651227147","full_name":"blobbybilb/why-doc","owner":"blobbybilb","description":"why?doc: A simple API docs generator for simple APIs.","archived":false,"fork":false,"pushed_at":"2024-05-26T04:16:29.000Z","size":36,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-30T02:14:45.775Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blobbybilb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-08T19:42:47.000Z","updated_at":"2024-05-26T04:16:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"a72e5a54-af8a-4ee1-b5fd-601e8d882318","html_url":"https://github.com/blobbybilb/why-doc","commit_stats":null,"previous_names":["blobbybilb/why-doc"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blobbybilb%2Fwhy-doc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blobbybilb%2Fwhy-doc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blobbybilb%2Fwhy-doc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blobbybilb%2Fwhy-doc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blobbybilb","download_url":"https://codeload.github.com/blobbybilb/why-doc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246763877,"owners_count":20829800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-02T06:19:04.469Z","updated_at":"2026-01-12T06:46:39.071Z","avatar_url":"https://github.com/blobbybilb.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"Archived, not general enough \u003e:)\n\n---\n\n# why?doc\n\nA simple API docs generator for simple APIs.\n\n## Usage (example with [Hono](https://hono.dev))\n\nImport:\n```ts\nimport {\n  genDocs,\n  WhyDoc,\n} from \"https://raw.githubusercontent.com/blobbybilb/why-doc/main/doc.ts\"\n```\n\nInitialize:\n```ts\nconst doc = WhyDoc({\n  title: \"Test API Docs\",\n  basePath: \"/api\", // optional\n})\n```\n\nThen, instead of:\n```ts\napp.get(\n  \"/test\",\n  (c) =\u003e c.text(\"test\"),\n)\n```\n\nDo:\n```ts\napp.get(\n  doc(\"/test\", \"a simple test\"), // returns the path to avoid repeating it\n  (c) =\u003e c.text(\"test\"),\n)\n```\n\nAdd GET and POST Parameters:\n```ts\napp.post(\n  doc(\"/abc\", \"\", {\n    postParams: {\n      name: \"string\",\n    },\n  }),\n  (c) =\u003e c.text(\"Done!\"),\n)\n\napp.get(\n  doc(\"/xyz\", \"returns the 'name' GET parameter\", {\n    getParams: {\n      name: \"string\",\n    },\n  }),\n  (c) =\u003e c.text(c.req.query(\"name\")!),\n)\n```\n\nFinally, generate the docs:\n```ts\ngenDocs() // optionally, pass in a string path to a different output file\napp.use(\"/docs\", serveStatic({ path: \"./docs.html\" })) // serve the static html file however you want\n```\n\nAnd get something like:\n\n\u003cimg width=\"400\" alt=\"Screenshot 2023-06-08 at 2 20 44 PM\" src=\"https://github.com/blobbybilb/why-doc/assets/58201828/f9cc1ff7-55be-443f-ada4-63d498cba145\"\u003e\n\n\n## License\n\nGNU LGPLv3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblobbybilb%2Fwhy-doc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblobbybilb%2Fwhy-doc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblobbybilb%2Fwhy-doc/lists"}