{"id":15494198,"url":"https://github.com/ojoanalogo/nestjs-redoc","last_synced_at":"2025-04-09T16:20:08.225Z","repository":{"id":38368108,"uuid":"195609186","full_name":"ojoanalogo/nestjs-redoc","owner":"ojoanalogo","description":"📘 ReDoc frontend for you NestJS swagger API documentation","archived":false,"fork":false,"pushed_at":"2024-06-15T00:25:45.000Z","size":1069,"stargazers_count":151,"open_issues_count":39,"forks_count":59,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-09T16:19:59.131Z","etag":null,"topics":["hacktoberfest","nestjs","nestjs-redoc","redoc","redoc-frontend","swagger"],"latest_commit_sha":null,"homepage":"","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/ojoanalogo.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-07-07T04:21:09.000Z","updated_at":"2025-04-04T16:13:33.000Z","dependencies_parsed_at":"2024-06-21T18:55:40.050Z","dependency_job_id":null,"html_url":"https://github.com/ojoanalogo/nestjs-redoc","commit_stats":null,"previous_names":["ojoanalogo/nestjs-redoc","mxarc/nestjs-redoc"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ojoanalogo%2Fnestjs-redoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ojoanalogo%2Fnestjs-redoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ojoanalogo%2Fnestjs-redoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ojoanalogo%2Fnestjs-redoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ojoanalogo","download_url":"https://codeload.github.com/ojoanalogo/nestjs-redoc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065281,"owners_count":21041872,"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":["hacktoberfest","nestjs","nestjs-redoc","redoc","redoc-frontend","swagger"],"created_at":"2024-10-02T08:12:18.214Z","updated_at":"2025-04-09T16:20:08.203Z","avatar_url":"https://github.com/ojoanalogo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  NestJS-Redoc\n  \u003ch4 align=\"center\"\u003eReDoc powered frontend for your NestJS API spec\u003c/h4\u003e\n\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"http://makeapullrequest.com\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\" alt=\"PRs welcome\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/nestjs/nest\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/nestjsx/crud/master/img/nest-powered.svg?sanitize=true\" alt=\"Nest Powered\" /\u003e\n  \u003c/a\u003e\n   \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[⚡ Features](#-Features) |\n[🗿 Installation](#-Installation) |\n[❓ How to use](#-How-to-use) |\n[👨‍💻👩‍💻 Contributors](#--Contributors) |\n[📜 Changelog](#-Changelog) |\n[📋 ToDo](#-ToDo)\n\n\u003c/div\u003e\n\n\u003cimg src=\"./redoc.png\"/\u003e\n\n\u003cp align=\"center\"\u003e\n\n📒 This is a [ReDoc](https://github.com/Redocly/redoc) powered frontend for your NestJS API spec.\n\n\u003c/p\u003e\n\n## ⚡ Features\n\n- Customizable theme\n- It's almost a drop in replacement for you current swagger UI, you only need to import this package and modify any settings you may want to change (e.g: Page title, ReDoc options)\n\n## 🗿 Installation\n\nUsing npm: `npm i nestjs-redoc`\n\nUsing yarn: `yarn add nestjs-redoc`\n\n## ❓ How to use\n\nYou need to install the [Swagger Module](https://github.com/nestjs/swagger) first if you want to get definitions updated with your project.\n\nIn future versions you will be able to pass a URL parameter as document, but for the moment you need this document object from the swagger module\n\n```typescript\nconst options = new DocumentBuilder()\n  .setTitle('Look, i have a title')\n  .setDescription('A very nice description')\n  .setBasePath('/api/v1')\n  .build();\nconst document = SwaggerModule.createDocument(app, options);\n```\n\nThen add the following example code.\n\n**Note**: All properties are optional, if you don't specify a title we will fallback to the one you used in your DocumentBuilder instance.\n\n```typescript\nconst redocOptions: RedocOptions = {\n  title: 'Hello Nest',\n  logo: {\n    url: 'https://redocly.github.io/redoc/petstore-logo.png',\n    backgroundColor: '#F0F0F0',\n    altText: 'PetStore logo'\n  },\n  sortPropsAlphabetically: true,\n  hideDownloadButton: false,\n  hideHostname: false,\n  auth: {\n    enabled: true,\n    user: 'admin',\n    password: '123'\n  },\n  tagGroups: [\n    {\n      name: 'Core resources',\n      tags: ['cats'],\n    },\n  ],\n};\n// Instead of using SwaggerModule.setup() you call this module\nawait RedocModule.setup('/docs', app, document, redocOptions);\n```\n\n## Available options\n\n### Redoc Options\n\n| Option                  | Description                                                                                                                                           | Type              | Note                                       |\n| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ------------------------------------------ |\n| title                   | Web site title (e.g: ReDoc documentation)                                                                                                             | string            |\n| favicon                 | Web site favicon URL                                                                                                                                  | string            | Fallbacks to the document title if not set |\n| logo                    | Logo options                                                                                                                                          | LogoOptions       | See LogoOptions table                      |\n| theme                   | Theme options                                                                                                                                         | ThemeOptions      | See ThemeOptions info                      |\n| untrustedSpec           | If set, the spec is considered untrusted and all HTML/markdown is sanitized to prevent XSS, by default is false                                       | boolean           |\n| supressWarnings         | If set, warnings are not rendered at the top of documentation (they are still logged to the console)                                                  | boolean           |\n| hideHostname            | If set, the protocol and hostname won't be shown in the operation definition                                                                          | boolean           |\n| expandResponses         | Specify which responses to expand by default by response codes, values should be passed as comma-separated list without spaces (e.g: 200, 201, \"all\") | string            |\n| requiredPropsFirst      | If set, show required properties first ordered in the same order as in required array                                                                 | boolean           |\n| sortPropsAlphabetically | If set, propeties will be sorted alphabetically                                                                                                       | boolean           |\n| showExtensions          | If set the fields starting with \"x-\" will be shown, can be a boolean or a string with names of extensions to display                                  | boolean           |\n| noAutoAuth              | If set, redoc won't inject authentication section automatically                                                                                       | boolean           |\n| pathInMiddlePanel       | If set, path link and HTTP verb will be shown in the middle panel instead of the right one                                                            | boolean           |\n| hideLoading             | If set, loading spinner animation won't be shown                                                                                                      | boolean           |\n| nativeScrollbars        | If set, a native scrollbar will be used instead of perfect-scroll, this can improve performance of the frontend for big specs                         | boolean           |\n| hideDownloadButton      | This will hide the \"Download spec\" button, it only hides the button                                                                                   | boolean           |\n| disableSearch           | If set, the search bar will be disabled                                                                                                               | boolean           |\n| onlyRequiredInSamples   | Shows only required fileds in request samples                                                                                                         | boolean           |\n| auth                    | Auth options                                                                                                                                          | AuthOptions       | See AuthOptions info                       |\n| AuthOptions info        |\n| enabled                 | If enabled, a prompt will pop out asking for authentication details, default: `false`                                                                 | boolean           |\n| user                    | User name, default: `admin`                                                                                                                           | string            |\n| password                | User password, default: `123`                                                                                                                         | string            |\n| tagGroups               | Tag groups options                                                                                                                                    | TagGroupOptions[] | See Tag Group options                      |\n| Tag Group options info  |\n| name                    | Tag name                                                                                                                                              | string            |\n| tags                    | Tag collection                                                                                                                                        | string[]          |\n| redocVersion            | Set an specific redoc version                                                                                                                         | string,number     | By default it's \"latest\"                   |\n\n\n\n\n**Note**: If you want to change your ReDoc theme settings, take a look at the official ReDoc documentation: \u003chttps://github.com/Redocly/redoc/blob/master/src/theme.ts\u003e\n\nApply the properties defined in ResolvedThemeInterface to the key called \"theme\" in the redoc options\n\n### Logo options\n\n| Option          | Description                                                                           | Type   | Example  |\n| --------------- | ------------------------------------------------------------------------------------- | ------ | -------- |\n| url             | The URL pointing to the spec Logo, must be in the format of a URL and an absolute URL | string |\n| backgroundColor | Background color to be used, must be RGB color in hexadecimal format (e.g: #008080)   | string | #F0F0F0  |\n| altText         | Alt tag for Logo                                                                      | string | PetStore |\n| href            | href tag for Logo, it defaults to the host used for your API spec                     | string |\n\n## 👨‍💻👩‍💻 Contributors\n\n- Special thanks to [Jay McDoniel (jmcdo29)](https://github.com/jmcdo29) who helped with code refactoring and unit tests! 👏\n- @joemaidman\n\n## 📜 Changelog\n\nBellow are a list of changes, some might go undocumented\n\n- 1.0.0 - First release\n- 1.1.0 - Minor changes, nothing too important\n- 1.2.0 - Added unit tests, refactored code\n- 1.2.1 - Updated to work with the latest version of nest swagger module\n- 1.2.2 - Fixed issue with URL on windows\n- 1.3.0 - Added favicon option (by @joemaidman)\n- 2.0.0 - Added authentication option, fixed issues with CSP and nestjs version compatibility issues\n- 2.1.0 - Added x-tagGroups extension property\n- 2.1.1 - Fixed CSP issue on Safari browser\n- 2.2.0 - Added version property, this way you can pin redoc to a specific version\n- 2.2.2 - Updated to support Nest 8\n\n## 📋 ToDo\n\n- Add Fastify support\n- Add the option to use a spec URL instead of document\n- Fix tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fojoanalogo%2Fnestjs-redoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fojoanalogo%2Fnestjs-redoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fojoanalogo%2Fnestjs-redoc/lists"}