{"id":18303541,"url":"https://github.com/sina-byn/auto-api-dog","last_synced_at":"2026-02-08T21:32:22.793Z","repository":{"id":243103018,"uuid":"809170127","full_name":"sina-byn/auto-api-dog","owner":"sina-byn","description":"a Node.JS CLI tool to easily generate api dog documentation file from your comments","archived":false,"fork":false,"pushed_at":"2024-06-07T05:44:02.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-07T23:34:45.290Z","etag":null,"topics":["api","api-doc","api-docs","api-document-generation","api-documentation","api-documentation-tool","api-documenter","cli","rest-api","restful-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sina-byn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-06-01T22:44:58.000Z","updated_at":"2024-07-21T05:51:57.000Z","dependencies_parsed_at":"2024-06-06T19:14:42.794Z","dependency_job_id":"8f850f28-5c8f-4567-a7c6-36ea8c6618bf","html_url":"https://github.com/sina-byn/auto-api-dog","commit_stats":null,"previous_names":["sina-byn/auto-api-dog"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sina-byn/auto-api-dog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sina-byn%2Fauto-api-dog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sina-byn%2Fauto-api-dog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sina-byn%2Fauto-api-dog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sina-byn%2Fauto-api-dog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sina-byn","download_url":"https://codeload.github.com/sina-byn/auto-api-dog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sina-byn%2Fauto-api-dog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271278994,"owners_count":24731900,"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","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["api","api-doc","api-docs","api-document-generation","api-documentation","api-documentation-tool","api-documenter","cli","rest-api","restful-api"],"created_at":"2024-11-05T15:25:58.915Z","updated_at":"2026-02-08T21:32:22.682Z","avatar_url":"https://github.com/sina-byn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# auto-api-dog [![NPM version](https://img.shields.io/npm/v/auto-api-dog.svg?style=flat)](https://www.npmjs.com/package/auto-api-dog) [![NPM monthly downloads](https://img.shields.io/npm/dm/auto-api-dog.svg?style=flat)](https://npmjs.org/package/auto-api-dog) [![NPM total downloads](https://img.shields.io/npm/dt/auto-api-dog.svg?style=flat)](https://npmjs.org/package/auto-api-dog) \n\n\u003e Easily document your REST APIs - auto-api-dog is a CLI tool that generates your [api-dog](https://apidog.com/) documentation file from your comments\n\nPlease consider following this project's author, [Sina Bayandorian](https://github.com/sina-byn), and consider starring the project to show your :heart: and support.\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Format](#format)\n  - [Fields](#fields)\n  - [Notes ⚠️](#notes)\n- [Options](#options)\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/package/auto-api-dog):\n\n```sh\n$ npm install -g auto-api-dog\n```\n\n## Usage\n\n```json\n// package.json\n\n{\n  \"scripts\": {\n    \"doc\": \"auto-api-dog\"\n  }\n}\n```\n\nThen :\n\n```sh\n$ npm run doc\n```\n\nRunning the command above will output `api.apidog.json` that you can import into the [api-dog](https://apidog.com/) application to have it generate your API documentation.\n\n## Format\n\nBelow is the document comment format :\n\n```js\n/**\n * Description multi-line description\n * @name - Create A Post\n * @method POST\n * @endpoint /\n * @maintainer sina-byn\n * @status developing\n * @query {number} id the id of the post\n * \n * @payload {object} - {\n *      \"title\": {\n *          \"en\": \"this is the en title\",\n *          \"fa\": \"this is the fa title\"\n *      }\n * }\n * \n * @required {object} - {\n *      \"title\": {\n *         \"required\": true,\n *         \"value\": {\n *              \"en\": { \"required\": true },\n *              \"fa\": { \"required\": true }\n *         }\n *      }\n * }\n */\n```\n\nVisit [comment parser](https://www.npmjs.com/package/comment-parser), and [JSDoc](https://jsdoc.app/) to read more about the documentation comments.\n\nNote that if you use [VS Code](https://code.visualstudio.com/) as your text editor it helps you with the asterisks.\n\n\n### Fields\n\nBelow is the table of all the fields that are defined for the cli. Make sure to read the [notes](#notes) below the table.\n\n| Name       | Type   | Default             | Description                                                         |\n|------------|--------|---------------------|---------------------------------------------------------------------|\n| name       | string | \"Untitled Endpoint\" | the name of the API endpoint - [special syntax](#name-syntax)                       |\n| method     | string |                     | API endpoint's method - must be all in uppercase letters - required |\n| status     | string | \"released\"          | API dog status - visit [api dog](https://apidog.com/) for more      |\n| maintainer | string |                     | the maintainer id from the [api dog](https://apidog.com/) project                          |\n| query      | [Param](#param-type)  |                     | defines a single query parameter                                    |\n| header     | [Param](#param-type)  |                     | defines a single request header                                     |\n| cookie     | [Param](#param-type)  |                     | defines a single request cookie                                     |\n| payload    | JSON object |                     | defines the example payload for the request - [important](#req-body)           |\n| required   | JSON object |                     | defines the required fields of the payload - [important](#req-body)        |\n\n### Notes \n\n- \u003cdiv id=\"name-syntax\"\u003e\u003c/div\u003edue to the \u003ca href=\"https://jsdoc.app/\"\u003eJSDoc\u003c/a\u003e convention the name should follow `@name - {endpoint_name}` the `-` is required or the first word of the name will be ignored\n\n- \u003cdiv id=\"req-body\"\u003e\u003c/div\u003e`payload` and `required`\n\n  - defining the `required` without the `payload` will result in an error\n\n  - `payload` is optional and is used to create a JSON schema and a sample request body\n\n  - the `required` field optional and is used to define the required fields of the JSON schema\n\n  - Note that generating the request body and JSON schema is a complex task, and the developer is responsible for ensuring accuracy and that the types match. For example, in some cases where `payload` and `required` do not match, you might end up with an error; in other cases, your schema might simply not include all the required fields.\n\n- \u003cdiv id=\"param-type\"\u003e\u003c/div\u003ethe `Param` type is a special type\n\n```js\n{\n  type: \"string\",\n  name: \"post_slug\",\n  description: \"desc\",\n  required: true,\n  example: \"first_post\",\n}\n```\n\nNote that support for complex data types for the `Param` type is yet to be added.\n\n**Example**\n\n```js\n/**\n * @header {number} id the id of the post\n */\n```\n\nis equal to\n\n```\n{\n  type: \"number\",\n  name: \"id\",\n  description: \"desc\",\n  required: true,\n}\n```\n\n`[id]` : `{ required: false }`\n`[id=12]` : `{ required: false, example: 12 }`\n`[!id=12]` : `{ required: true, example: 12 }`\n\nNote that `!` only works when an example is provided otherwise it will be included in the name of the param.\n\n## Options\n\n| Name        | Type   | Default   | Description                                                   |\n|-------------|--------|-----------|---------------------------------------------------------------|\n| -i, --input | string | \"\\*\\*/\\*.js\" | glob pattern to match input files that have document comments |\n| -n, --name  | string | \"api\"     | output json file name - {name}.apidog.json                    |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsina-byn%2Fauto-api-dog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsina-byn%2Fauto-api-dog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsina-byn%2Fauto-api-dog/lists"}