{"id":21361022,"url":"https://github.com/farist/liftr-docs","last_synced_at":"2026-05-14T01:42:27.682Z","repository":{"id":263676697,"uuid":"173910241","full_name":"farisT/liftr-docs","owner":"farisT","description":"Documentation middleware for Liftr to document your routes in Swagger","archived":false,"fork":false,"pushed_at":"2019-06-02T16:20:55.000Z","size":31,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T19:13:08.963Z","etag":null,"topics":["documentation","express","liftr","liftr-docs","swagger","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/liftr-docs","language":"TypeScript","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/farisT.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":"2019-03-05T08:53:32.000Z","updated_at":"2019-10-08T21:38:00.000Z","dependencies_parsed_at":"2024-11-19T21:20:06.516Z","dependency_job_id":"ab0cf948-ec29-4cb6-8b1d-4baa4f52925e","html_url":"https://github.com/farisT/liftr-docs","commit_stats":null,"previous_names":["farist/liftr-docs"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farisT%2Fliftr-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farisT%2Fliftr-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farisT%2Fliftr-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farisT%2Fliftr-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/farisT","download_url":"https://codeload.github.com/farisT/liftr-docs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243835937,"owners_count":20355611,"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":["documentation","express","liftr","liftr-docs","swagger","typescript"],"created_at":"2024-11-22T06:04:06.249Z","updated_at":"2025-10-06T16:46:16.060Z","avatar_url":"https://github.com/farisT.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# liftr-docs\n\n[![npmversion](https://img.shields.io/npm/v/@liftr/docs.svg)](https://github.com/farisT/liftr-docs)\n\nA middleware for documenting your [Liftr](https://github.com/farisT/liftr) routes with [Swagger 3.0](https://swagger.io/) under the hood.\n\n## Installation\n\n```\nnpm install @liftr/docs --save\n```\n\n\n## Example usage\n\n```\nimport * as express from 'express';\nimport { LiftrDocs } from '@liftr/docs';\nimport { routes } from '@routes/LiftrRoutingModule';\n\n// swaggerDescriptions\n// ---------------------------\n// standard info and port config for the documentation\n// the version of openapi used is 3.0.0. THIS SHOULD NOT CHANGE.\n\nconst swaggerDescriptions = {\n  info: {\n    title: 'Liftr REST API',\n    version: '1.0.0',\n    description: 'REST API for all the endpoints',\n  },\n  servers: [{\n    url: `http://localhost:${process.env.PORT || 4000}`,\n  }],\n  openapi: '3.0.0', \n  paths: {},\n};\n\n// swaggerResponses\n// ---------------------------\n// Define the responses for your API endpoints and what type of request body you will send. \n\nconst swaggerResponses = {\n  responses: {\n    200: {\n      description: 'OK',\n    },\n    400: {\n      description: 'Error: Bad Request',\n    },\n    401: {\n      description: 'Error: Unauthorized',\n    },\n  },\n  requestBody: {\n    required: true,\n    content: {\n      'application/json': { },\n    },\n    description: '',\n  },\n};\n\n// This will initiate the /docs route to contain the swagger documentation\n// This will use the routes created in the LiftrRoutingModule\napp.use('/docs', LiftrDocs(routes, swaggerDescriptions, swaggerResponses));\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarist%2Fliftr-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffarist%2Fliftr-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarist%2Fliftr-docs/lists"}