{"id":22221242,"url":"https://github.com/victorbadaro/node-swagger-example","last_synced_at":"2025-06-12T22:38:35.890Z","repository":{"id":194987262,"uuid":"692013091","full_name":"victorbadaro/node-swagger-example","owner":"victorbadaro","description":"An example node/express app that uses swagger","archived":false,"fork":false,"pushed_at":"2023-09-15T20:58:06.000Z","size":45,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T07:13:49.201Z","etag":null,"topics":["node","node-js","nodejs","swagger","swagger-ui","ts","ts-node-dev","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/victorbadaro.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-09-15T11:20:34.000Z","updated_at":"2024-08-08T18:48:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"7980cd80-7549-4d4a-a3f1-2d0ca648348a","html_url":"https://github.com/victorbadaro/node-swagger-example","commit_stats":null,"previous_names":["victorbadaro/node-swagger-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorbadaro%2Fnode-swagger-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorbadaro%2Fnode-swagger-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorbadaro%2Fnode-swagger-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorbadaro%2Fnode-swagger-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/victorbadaro","download_url":"https://codeload.github.com/victorbadaro/node-swagger-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245422921,"owners_count":20612725,"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":["node","node-js","nodejs","swagger","swagger-ui","ts","ts-node-dev","typescript"],"created_at":"2024-12-02T23:12:49.138Z","updated_at":"2025-03-25T07:42:43.434Z","avatar_url":"https://github.com/victorbadaro.png","language":"TypeScript","readme":"# node-swagger-example\n\n[![LEIAME.md](https://img.shields.io/badge/-Leia%20em%20Portugu%C3%AAs-brightgreen?style=for-the-badge)](./LEIAME.md)\n\n## Summary\n- [🧾 About](#-about)\n- [🚀 Main technologies](#-main-technologies)\n- [💻 Usage](#-usage)\n- [👌 Requests](#-requests)\n\n## 🧾 About\nThis is an example of how to use swagger in a Node/Express application\n\n## 🚀 Main technologies\n- [Node.js](https://nodejs.org/)\n- [Express](https://expressjs.com/)\n- [Typescript](https://www.typescriptlang.org/)\n- [Swagger](https://swagger.io/) (_using the [swagger-ui-express](https://github.com/scottie1984/swagger-ui-express) dependency_)\n\n_(You can see all the dependencies in the [package.json](./package.json) file)_\n\n## 💻 Usage\n1. Clone the project (you'll need a [personal access token](https://docs.github.com/pt/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls)):\n   ```bash\n   $ git clone https://github.com/victorbadaro/node-swagger-example\n   ```\n\n2. Access its directory:\n   ```bash\n   $ cd node-swagger-example\n   ```\n\n3. Install its dependencies:\n   ```bash\n   $ yarn\n   # feel free to use another package manager, but you might want use yarn once there's already a yarn.lock file in the root directory\n   ```\n\n4. Create a `.env` file in the root directory with the same content that is in the [.env.example](./.env.example) file and fill the `SERVER_PORT` variable with your own data (don't forget to change the `port` variable in the [requests](./requests.http) file if you're going to use it):\u003cbr /\u003e\n   For example:\u003cbr /\u003e\n   ![image](https://github.com/victorbadaro/node-swagger-example/assets/9096344/a1602e7a-e0be-4ba0-b383-02b7230d3eae)\n\n5. Start the server by running the `dev` script:\n   ```bash\n   $ yarn dev\n   ```\n\n## 👌 Requests\nNow the server is ready to receive your requests. The **Swagger docs** are available on http://localhost:3333/api-docs (or localhost:{AnyOtherServerPortYouAreGoingToUse}/api-docs)! There's a [requests](./requests.http) file in the root directory so you can use (you might want to use the [Rest Client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) extension).\u003cbr /\u003e\nHere are the requests you can make:\n\n- GET /users\n- POST /users\n  ```json\n  {\n    \"name\": \"Shauna Farrell\",\n    \"email\": \"shauna.farrell@email.com\"\n  }\n  ```\n![image](https://github.com/victorbadaro/node-swagger-example/assets/9096344/47694078-8ba2-4d7d-a488-714b35bde713)\n---\n\n\u003cp align=\"center\"\u003eThis project was created and developed with ❤ by \u003ca href=\"https://github.com/victorbadaro\"\u003eVictor Badaró\u003c/a\u003e\u003c/p\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictorbadaro%2Fnode-swagger-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvictorbadaro%2Fnode-swagger-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictorbadaro%2Fnode-swagger-example/lists"}