{"id":44283975,"url":"https://github.com/ahmadarif/adonis-swagger","last_synced_at":"2026-02-10T22:10:19.042Z","repository":{"id":29978802,"uuid":"123382131","full_name":"ahmadarif/adonis-swagger","owner":"ahmadarif","description":"Swagger provider for Adonis 4.x","archived":false,"fork":false,"pushed_at":"2022-12-07T17:50:04.000Z","size":4737,"stargazers_count":92,"open_issues_count":21,"forks_count":28,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-11-23T14:07:28.065Z","etag":null,"topics":["adonisjs","documentation-generator","documentation-tool","swagger","swagger-ui"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/ahmadarif.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}},"created_at":"2018-03-01T04:29:15.000Z","updated_at":"2023-10-14T16:51:25.000Z","dependencies_parsed_at":"2023-01-14T16:15:16.907Z","dependency_job_id":null,"html_url":"https://github.com/ahmadarif/adonis-swagger","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/ahmadarif/adonis-swagger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadarif%2Fadonis-swagger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadarif%2Fadonis-swagger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadarif%2Fadonis-swagger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadarif%2Fadonis-swagger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmadarif","download_url":"https://codeload.github.com/ahmadarif/adonis-swagger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadarif%2Fadonis-swagger/sbom","scorecard":{"id":171899,"data":{"date":"2025-08-11","repo":{"name":"github.com/ahmadarif/adonis-swagger","commit":"19a00e49e13651ec31bc8a037a1921c097d9cd6c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.6,"checks":[{"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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"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":"Code-Review","score":2,"reason":"Found 5/17 approved changesets -- score normalized to 2","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":"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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 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"}},{"name":"Vulnerabilities","score":0,"reason":"62 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-c6rq-rjc2-86v2","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-q42p-pg8m-cqh6","Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9","Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f","Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p","Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv","Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8","Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65","Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546","Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-jv35-xqg7-f92r","Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp","Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr","Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-qgmg-gppg-76g5","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T16:45:54.278Z","repository_id":29978802,"created_at":"2025-08-16T16:45:54.278Z","updated_at":"2025-08-16T16:45:54.278Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29319479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T20:44:44.282Z","status":"ssl_error","status_checked_at":"2026-02-10T20:44:43.393Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["adonisjs","documentation-generator","documentation-tool","swagger","swagger-ui"],"created_at":"2026-02-10T22:10:18.136Z","updated_at":"2026-02-10T22:10:19.025Z","avatar_url":"https://github.com/ahmadarif.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Adonis Swagger\n[![npm version](https://badge.fury.io/js/adonis-swagger.svg)](https://badge.fury.io/js/adonis-swagger)\n[![build status](https://travis-ci.org/ahmadarif/adonis-swagger.svg?branch=master)](https://travis-ci.org/ahmadarif/adonis-swagger)\n[![npm](https://img.shields.io/npm/dt/adonis-swagger.svg)](https://www.npmjs.com/package/adonis-swagger)\n[![npm](https://img.shields.io/npm/l/adonis-swagger.svg)](https://www.npmjs.com/package/adonis-swagger)\n[![Coverage Status](https://coveralls.io/repos/github/ahmadarif/adonis-swagger/badge.svg)](https://coveralls.io/github/ahmadarif/adonis-swagger)\n\nCreate documentation easily in Adonis 4.x using [Swagger][Swagger] 😍\n\n# Installation\n```\nadonis install adonis-swagger\n```\n\n# Configuration\n* Register `SwaggerProvider` in `start/app.js`:\n  ```js\n  const providers = [\n    ...\n    'adonis-swagger/providers/SwaggerProvider'\n  ]\n  ```\n\n* **Note:** For projects that uses API-only blueprint (using `--api-only` flag), please \n  enable `Adonis/Middleware/Static` under `serverMiddleware` in `start/kernel.js`:\n  ```js\n  const serverMiddleware = [\n    'Adonis/Middleware/Static',\n    ...\n  ]\n  ```\n\n* For other configuration, please update the `config/swagger.js`.\n\n# Sample Usage\n* Add new route:\n  ```js\n  Route.get('/api/hello', 'TestController.hello')\n  ```\n\n* Create `TestController` using `adonis make:controller Test` command:\n  ```js\n  'use strict'\n  \n  class TestController {\n  \n    /**\n    * @swagger\n    * /api/hello:\n    *   get:\n    *     tags:\n    *       - Test\n    *     summary: Sample API\n    *     parameters:\n    *       - name: name\n    *         description: Name of the user\n    *         in: query\n    *         required: false\n    *         type: string\n    *     responses:\n    *       200:\n    *         description: Send hello message\n    *         example:\n    *           message: Hello Guess\n    */\n    async hello({ request, response }) {\n      const name = request.input('name', 'Guess')\n      response.send({ message: 'Hello ' + name })\n    }\n  }\n  \n  module.exports = TestController\n  ```\n\n* You can also define the schema in the Models:\n  ```js\n  'use strict'\n  \n  const Model = use('Model')\n  \n  /** \n  *  @swagger\n  *  definitions:\n  *    User:\n  *      type: object\n  *      properties:\n  *        id:\n  *          type: uint\n  *        username:\n  *          type: string\n  *        email:\n  *          type: string\n  *        password:\n  *          type: string\n  *      required:\n  *        - username\n  *        - email\n  *        - password\n  */\n  class User extends Model {\n  }\n  \n  module.exports = User\n  ```\n\n* Or create a separate file containing documentation from the APIs in either JS or YAML formats, sample structure:\n  ```bash\n  project\n  ├── app\n  ├── config \n  ├── docs\n  │   ├── controllers\n  │   │   ├── **/*.js\n  │   │   ├── **/*.yml\n  │   └── models\n  │       ├── **/*.js\n  │       ├── **/*.yml\n  ```\n\n* For other sample in YAML and JS format, please refer to this [link](/sample).\n\nOpen http://localhost:3333/docs in your browser, ayeey 🎉  \nFor detail usage, please check the Swagger specification in this [link][SwaggerSpec].\n\n# Command List\nCommand                       | Description\n:-----------------------------|:-----------\n `adonis swagger:export`      | Export config file \u0026 swagger-ui assets\n `adonis swagger:export-docs` | Export swagger-ui assets only\n `adonis swagger:remove`      | Remove config file \u0026 swagger-ui assets\n `adonis swagger:remove-docs` | Remove swagger-ui only\n\n# Dependencies\n- [swagger-jsdocs](https://www.npmjs.com/package/swagger-jsdoc)\n- [swagger-ui-dist](https://www.npmjs.com/package/swagger-ui-dist)\n\n# Thanks\nSpecial thanks to the creator(s) of [AdonisJS][AdonisJS] for creating such a great framework.\n\n[Swagger]:https://swagger.io/\n[SwaggerSpec]:https://swagger.io/specification/\n[AdonisJS]: http://adonisjs.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmadarif%2Fadonis-swagger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmadarif%2Fadonis-swagger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmadarif%2Fadonis-swagger/lists"}