{"id":20549841,"url":"https://github.com/ranork/swagger-gpt","last_synced_at":"2026-05-06T18:35:00.410Z","repository":{"id":183464771,"uuid":"670188548","full_name":"Ranork/Swagger-GPT","owner":"Ranork","description":"Swagger auto configuration with Chat GPT (NodeJS)","archived":false,"fork":false,"pushed_at":"2024-07-12T09:58:11.000Z","size":60,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-16T16:46:01.040Z","etag":null,"topics":["api","automatic-documentation","chatgpt","code-generation","codegeneration","developer-tools","documentation","javascript","json","nodejs","opensource","rest-api","swagger","web-api","webapi","webdevelopment"],"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/Ranork.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":"2023-07-24T13:39:25.000Z","updated_at":"2024-07-12T09:58:14.000Z","dependencies_parsed_at":"2024-11-16T02:21:38.431Z","dependency_job_id":"00745ad5-043a-495c-aa65-3791749979e8","html_url":"https://github.com/Ranork/Swagger-GPT","commit_stats":null,"previous_names":["ranork/swagger-gpt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ranork%2FSwagger-GPT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ranork%2FSwagger-GPT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ranork%2FSwagger-GPT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ranork%2FSwagger-GPT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ranork","download_url":"https://codeload.github.com/Ranork/Swagger-GPT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242157178,"owners_count":20081036,"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":["api","automatic-documentation","chatgpt","code-generation","codegeneration","developer-tools","documentation","javascript","json","nodejs","opensource","rest-api","swagger","web-api","webapi","webdevelopment"],"created_at":"2024-11-16T02:21:25.825Z","updated_at":"2026-05-06T18:34:55.378Z","avatar_url":"https://github.com/Ranork.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swagger-GPT\nAutomatic Swagger Configuration for Node.js API Routes\n\n[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![GitHub stars](https://img.shields.io/github/stars/Ranork/Swagger-GPT.svg)](https://github.com/Ranork/Swagger-GPT/stargazers)\n\nWelcome to the **Automatic Swagger Configuration** project! This Node.js-based repository aims to simplify the process of generating Swagger documentation for your API routes. Swagger is a powerful tool for describing and visualizing APIs, making it easier for developers to understand and interact with your endpoints.\n\nThis project gives you a flatten javascript file and necessery prompts to make a swagger configuration with chat gpt.\n\n## Table of Contents\n\n- [Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Installation](#installation)\n- [Usage](#usage)\n- [Examples](#examples)\n- [Configuration](#configuration)\n- [Contributing](#contributing)\n- [License](#license)\n- [Contact](#contact)\n\n## Getting Started\n\n### Prerequisites\n\nBefore you start using this tool, ensure you have the following prerequisites installed:\n\n- Node.js (v12.0.0 or higher)\n- NPM (v6.0.0 or higher)\n- Your Node.js API project with defined routes\n\n### Installation\n\nTo install this package, simply clone this repository and install the required dependencies:\n\n```bash\ngit clone https://github.com/Ranork/Swagger-GPT.git\ncd Swagger-GPT\nnpm install\n```\n\n## Usage\n\n1. Before running the \"generate-swagger\" command, make sure you have cloned this repository and installed the required dependencies following the steps in the [Installation](#installation) section.\n\n2. Copy the `.env.example` file to a new file named `.env` in the root directory of the project:\n\n```bash\ncp .env.example .env\n```\n\n3. Open the `.env` file using a text editor of your choice and modify the values according to your project requirements:\n\n```plaintext\ntarget_path=\".../API/src/routes\"\nfile_suffix=\".js\"\n```\n\n- `target_path`: Specify the path where your Node.js API routes are located. This tool will scan the provided path for route files and generate Swagger documentation accordingly.\n- `file_suffix`: If your route files have a specific file extension other than \".js\", you can specify it here.\n\n4. Once you have configured the `.env` file, you can now run the \"generate-swagger\" command to automatically generate Swagger configurations for your API routes:\n\n```bash\nnpm run start\n```\n\nThis command will utilize the configurations from the `.env` file, scan your Node.js API project, identify the defined routes, and generate Swagger documentation in JSON format.\n\n5. Go to docs/ folder and open your files in order\n\n6. Copy all lines and send to chat.openai.com bot\n\n7. There is your swagger configuration!\n\n\n## Examples\n\n```javascript\n/**\n * @swagger\n * /login:\n *   delete:\n *     summary: Kullanıcı Çıkışı\n *     description: Kullanıcıyı çıkış yapar ve tokenı geçersiz kılar.\n *     tags: [Auth]\n *     parameters:\n *       - name: Token\n *         in: header\n *         required: true\n *         schema:\n *           type: string\n *         description: Kullanıcı tokenı.\n *     responses:\n *       '200':\n *         description: Çıkış başarılı.\n *         content:\n *           application/json:\n *             schema:\n *               type: object\n *               properties:\n *                 Success:\n *                   type: boolean\n *                   example: true\n*/\n\n/**\n * @swagger\n * tags:\n *   name: Auth\n *   description: Kullanıcı girişi ve çıkışı için API yönlendirmesi\n*/\n```\n\n\n\n## Configuration\n\nYou can customize the Swagger documentation generated by this tool using the base.txt file. The base.txt file allows you to provide additional comments and instructions that will be added to the generated Swagger documentation for each API route. This way, you can provide more context, descriptions, and notes specific to your API endpoints. The tool will look for the base.txt file and include its content for each route in the Swagger documentation.\n\nThe base.txt file in default:\n\n```plaintext\n// Create a swagger description for the route file given at the top, considering the following files\n// Create this specification to be added with @swagger inside the route javascript file\n// Create a tag that defines the route and add it to it\n// Show only rows to be added as attachments\n// Pay attention to the details of the body parameters\n// Make Language: Turkish\n```\n\n\n## Contributing\nWe welcome contributions from the community to improve this project and make it even more robust. If you have any bug fixes, enhancements, or new features to propose, please follow the standard GitHub fork and pull request workflow.\n\nFor more details, please read our Contribution Guidelines.\n\n## License\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Contact\nIf you have any questions or suggestions regarding this project, please feel free to reach out to us:\n\nEmail: your.email@example.com\nGitHub: @Ranork\n\n\u003cbr\u003e\nThank you for using Automatic Swagger Configuration for Node.js API Routes! Happy documenting your APIs!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franork%2Fswagger-gpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Franork%2Fswagger-gpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franork%2Fswagger-gpt/lists"}