{"id":13527127,"url":"https://github.com/swagger-api/swagger-node","last_synced_at":"2025-12-18T10:06:58.560Z","repository":{"id":47426025,"uuid":"2219738","full_name":"swagger-api/swagger-node","owner":"swagger-api","description":"Swagger module for node.js","archived":true,"fork":false,"pushed_at":"2022-09-14T14:39:48.000Z","size":2444,"stargazers_count":3965,"open_issues_count":205,"forks_count":579,"subscribers_count":156,"default_branch":"master","last_synced_at":"2025-09-14T22:26:48.411Z","etag":null,"topics":["javascript","openapi-specification","rest","rest-api","swagger","swagger-api","swagger-node"],"latest_commit_sha":null,"homepage":"http://swagger.io","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swagger-api.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}},"created_at":"2011-08-17T03:51:37.000Z","updated_at":"2025-09-14T10:44:33.000Z","dependencies_parsed_at":"2022-08-12T13:40:13.963Z","dependency_job_id":null,"html_url":"https://github.com/swagger-api/swagger-node","commit_stats":null,"previous_names":["swagger-api/swagger-node-express","wordnik/swagger-node-express"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/swagger-api/swagger-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagger-api%2Fswagger-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagger-api%2Fswagger-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagger-api%2Fswagger-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagger-api%2Fswagger-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swagger-api","download_url":"https://codeload.github.com/swagger-api/swagger-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagger-api%2Fswagger-node/sbom","scorecard":{"id":861493,"data":{"date":"2025-08-11","repo":{"name":"github.com/swagger-api/swagger-node","commit":"fc777a61ccaf54076d0a3ffcfafedc347abc15ba"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":7,"reason":"Found 7/10 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T01:26:10.081Z","repository_id":47426025,"created_at":"2025-08-24T01:26:10.081Z","updated_at":"2025-08-24T01:26:10.081Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278257908,"owners_count":25957280,"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-10-04T02:00:05.491Z","response_time":63,"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":["javascript","openapi-specification","rest","rest-api","swagger","swagger-api","swagger-node"],"created_at":"2024-08-01T06:01:41.711Z","updated_at":"2025-10-06T10:31:08.237Z","avatar_url":"https://github.com/swagger-api.png","language":"JavaScript","readme":"# Archived\n\nThis GitHub repository has been archived. \nThe npmjs package `swagger` may be re-used at a later date for a different project.\nhttps://swagger.io/ may have similar or alternative functionality if you depend(ed) on this project.\n\n\n[![Build Status](https://travis-ci.org/swagger-api/swagger-node.svg?branch=master)](https://travis-ci.org/swagger-api/swagger-node) \n[![NPM version](https://badge.fury.io/js/swagger.png)](http://badge.fury.io/js/swagger)\n[![Dependency Status](https://david-dm.org/swagger-api/swagger-node/status.svg)](https://david-dm.org/swagger-api/swagger-node)\n[![devDependency Status](https://david-dm.org/swagger-api/swagger-node/dev-status.svg)](https://david-dm.org/swagger-api/swagger-node#info=devDependencies)\n\n\nThe `swagger` module provides tools for designing and building Swagger-compliant APIs entirely in Node.js. It integrates with popular Node.js servers, including Express, Hapi, Restify, and Sails, as well as any Connect-based middleware. With `swagger`, you can specify, build, and test your API from the very beginning, on your laptop. It allows you to change and iterate your design without rewriting the logic of your implementation.\n\n![alt text](./docs/images/overview2.png)\n\n\nRemember, one great thing about this approach is that all of the Swagger validation logic is handled for you, and all of the routing logic is managed through the Swagger configuration. You don't have to code (or recode!) any of that stuff yourself.\n\n# Your swagger API in five steps\n\n## 1. Install the swagger module\n\nInstall using npm. For complete instructions, see the [install](./docs/install.md) page.\n\n```bash\n$ npm install -g swagger\n```\n\n## 2. Create a new swagger project\n\nUse the [CLI](./docs/cli.md) to create and manage projects. Learn more on the [quick start](./docs/quick-start.md) page.\n\n```bash\n$ swagger project create hello-world\n```\n\n## 3. Design your API in the Swagger Editor\n\nThe interactive, browser-based [Swagger Editor](http://editor.swagger.io/) is built in. It provides Swagger 2.0 validation and endpoint routing, generates docs on the fly, and consumes easy-to-read YAML.\n\n```bash\n$ swagger project edit\n```\n\n![screenshot of project editor](./docs/images/project-editor.png)\n\n## 4. Write controller code in Node.js\n\nCode your API's business logic in Node.js.\n\n```js\nfunction hello(req, res) {\n    var name = req.swagger.params.name.value || 'stranger';\n    var hello = util.format('Hello, %s!', name);\n    res.json({ \"message\": hello });\n}\n```\n\nIf you look at the Swagger file in the editor (shown in step 3 above), the `x-swagger-router-controller` element (line 17 in the editor screenshot) specifies the name of the controller file associated with the `/hello` path. For example:\n\n```yaml\n    paths:\n        /hello:\n            x-swagger-router-controller: hello_world\n```\n\nController source code is always placed in `./api/controllers`. So, the controller source file for this project is `./api/controllers/hello_world.js`.\n\nThe `operationId` element specifies which controller function to call. In this case (line 19), it is a function called `hello`. Learn [more](./docs/controllers.md).\n\n## 5. Run the server\n\nRun the project server.\n\n```bash\n$ swagger project start\n```\n\n## Now, call the API!\n\nIt just works!\n\n```bash\n$ curl http://127.0.0.1:10010/hello?name=Scott\n{ \"message\": \"Hello, Scott!\" }\n```\n\n# \u003ca name=\"installation\"\u003e\u003c/a\u003eInstalling the swagger module\n\nSee the [Installing swagger](./docs/install.md) for details.\n\n# \u003ca name=\"using\"\u003e\u003c/a\u003eUsing the swagger module\n\nGo to the [swagger module doc page](./docs/README.md). It includes all the information you need to get started.\n\n# \u003ca name=\"about\"\u003e\u003c/a\u003eAbout this project\n\nThis initiative grew out of Apigee-127, an API design-first development framework using Swagger.\nApigee donated the code to create the swagger-node project in 2015.\n\n \u003eCopyright 2016 Apigee Corporation\n\n \u003eLicensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n \u003ehttp://www.apache.org/licenses/LICENSE-2.0\n\n \u003eUnless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n---\n\u003cimg src=\"http://swagger.io/wp-content/uploads/2016/02/logo.jpg\"/\u003e\n","funding_links":[],"categories":["Repository","JavaScript"],"sub_categories":["API Management"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswagger-api%2Fswagger-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswagger-api%2Fswagger-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswagger-api%2Fswagger-node/lists"}