{"_id":"@brakebein/nestjs-redoc","_rev":"3-2498a70e58f849316b05c67170f68562","name":"@brakebein/nestjs-redoc","dist-tags":{"latest":"2.5.0"},"versions":{"2.3.0":{"name":"@brakebein/nestjs-redoc","version":"2.3.0","author":{"name":"Alfonso Reyes"},"license":"MIT","_id":"@brakebein/nestjs-redoc@2.3.0","maintainers":[{"name":"brakebein","email":"bruschie@hotmail.com"}],"homepage":"https://github.com/Brakebein/nestjs-redoc#readme","bugs":{"url":"https://github.com/Brakebein/nestjs-redoc/issues"},"dist":{"shasum":"fe06fcab3785bbc397c481fcf60c96e62110d3ef","tarball":"https://registry.npmjs.org/@brakebein/nestjs-redoc/-/nestjs-redoc-2.3.0.tgz","fileCount":18,"integrity":"sha512-uJm8SWhNnvzK1bo4YGiYaFcazy1IouaGSeHNQBiM+hMbMsZ5X3+hRHc/stFySQtS26NV+di0ApnpefSSZHwhcw==","signatures":[{"sig":"MEQCIEpa+O8QTVRor0/fdKxRb5WsYxwQq8vBxMja5HNfxU6oAiAB5O3cxoO/CqXNRCDBgm6j3JUpUzwPNbcnB2ob9z131Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKw1wACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq0kA//VBz0ILyaG1Bs79+XQeyb5sd4iNx62pEmeRUGM6VAbLwP0rgz\r\nAK4J8aozFpp7MwuulrTas/rsLJYC9/6491uydVGPq9RoEibDaAnRnNJQ1htk\r\nu7EM5BDhUXv7hsK8mqBNr4G/hgy4B1GnLJq9YMLW6S7G8UHz2KQcy0LicUIa\r\n6fm50P+Ca8BWxnKfm6BM74XojOcSJ5wzUB099KQWM2sZDOQzVt7VI4hFkZFR\r\n6pACM6ANoP2HCZyum2vd/pT2agdBPWl+Trus8jILkVn4SNqebUWVdXldi+GA\r\nUTimEAUE48ka4KKU4j8LMR8/l5CEoCyhpWuL85nVTrVbZqIKIkVNaiOJWpp4\r\nkf80JhNwuhPJtNbm8emyuAOMFLQiM+6qXZ03yTGqzKAQZIEjYg56FiwYrW/z\r\nvIqpsKfCU9y3qOfjAzbRrVyg30IubVUobrNdZy8d4Xtm2dQ89kiOO6n8frwX\r\nEsNiz+vtB/26evG9l2+SmTSdqBtNbERwZn9SedDxElZhh3gAf0KX1m25Zq/5\r\ndM6GhCBXNwztgYZoorUkvSt4LnVBdAMoZ3rB4HhDdv8i8NA8rds8hct98OWn\r\n0PIWuQzKE8l1d7FcRR8P5UTVnnyVR/3s0QXPjl/JG7109b+eRsC8MveY+LXV\r\ndWhphmRxn+V4b+/sUhZ/QsRYI4Y/9GN+FwY=\r\n=gcyr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"./dist\\index.d.ts","config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"f5fade12977390750a9b6fa702ca1e42c5308494","private":false,"scripts":{"lint":"eslint \"./src/**/*.ts\" --fix","test":"jest","build":"tsc -p ./tsconfig.build.json","format":"prettier --write \"./src/**/*.ts\"","sample":"ts-node ./sample/main","publish":"npm publish --access public","prebuild":"rimraf ./dist","prepublish":"npm run build","test:watch":"jest --watch","format:check":"prettier --check \"./src/**/*.ts\"","publish:next":"npm publish --access public --tag next","prepublish:next":"npm run build"},"_npmUser":{"name":"brakebein","email":"bruschie@hotmail.com"},"repository":{"url":"git+https://github.com/Brakebein/nestjs-redoc.git","type":"git"},"_npmVersion":"8.4.0","description":"NestJS ReDoc frontend","directories":{},"_nodeVersion":"18.7.0","dependencies":{"@hapi/joi":"^17.1.1","@nestjs/common":"^9.0.0","@nestjs/swagger":"^6.0.0","express-basic-auth":"^1.2.1","express-handlebars":"^6.0.6"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","rxjs":"^7.2.0","husky":"^8.0.1","eslint":"^8.21.0","rimraf":"^3.0.2","ts-jest":"^28.0.7","ts-node":"^10.0.0","prettier":"^2.7.1","supertest":"^6.2.4","commitizen":"^4.2.5","typescript":"^4.3.5","@types/jest":"^28.1.6","@types/node":"^18.6.4","@nestjs/core":"^9.0.0","@types/express":"^4.17.13","@commitlint/cli":"^17.0.3","@nestjs/testing":"^9.0.0","@types/hapi__joi":"^17.1.8","@types/supertest":"^2.0.12","reflect-metadata":"^0.1.13","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@nestjs/platform-express":"^9.0.0","@nestjs/platform-fastify":"^9.0.0","@types/express-handlebars":"^6.0.0","@typescript-eslint/parser":"^5.32.0","@commitlint/config-conventional":"^17.0.3","@typescript-eslint/eslint-plugin":"^5.32.0"},"peerDependencies":{"@nestjs/core":"^9.0.0","@nestjs/common":"^9.0.0","@nestjs/swagger":"^6.0.0","reflect-metadata":"^0.1.12"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-redoc_2.3.0_1663765871736_0.733029812608436","host":"s3://npm-registry-packages"}},"2.4.0":{"name":"@brakebein/nestjs-redoc","version":"2.4.0","author":{"name":"Alfonso Reyes"},"license":"MIT","_id":"@brakebein/nestjs-redoc@2.4.0","maintainers":[{"name":"brakebein","email":"bruschie@hotmail.com"}],"homepage":"https://github.com/Brakebein/nestjs-redoc#readme","bugs":{"url":"https://github.com/Brakebein/nestjs-redoc/issues"},"dist":{"shasum":"4ef1acb2d8c29c8c3fa31e20ec7892c1d5c93dcc","tarball":"https://registry.npmjs.org/@brakebein/nestjs-redoc/-/nestjs-redoc-2.4.0.tgz","fileCount":18,"integrity":"sha512-m247pzOh64Qg9MTXpTCt257c/kiXtRLys+dD1mtEtNGUvCeNpI9Qn5CqcrH6aL8Ymly533pqy0mZ852JAcAg8g==","signatures":[{"sig":"MEQCIFHL83uiMVHpaGQckXrcUr+L0OvlNrEIYciU252Ms7VyAiANpfoRb57Yat5CQAyWKkWVHLFEQ8brio6J2ux7RVOuWA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28032},"main":"dist/index.js","types":"./dist/index.d.ts","config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"4873d48a4208734d7d49d88eff74eb0b86aa5521","private":false,"scripts":{"lint":"eslint \"./src/**/*.ts\" --fix","test":"jest","build":"tsc -p ./tsconfig.build.json","format":"prettier --write \"./src/**/*.ts\"","sample":"ts-node ./sample/main","publish":"npm publish --access public","prebuild":"rimraf ./dist","prepublish":"npm run build","test:watch":"jest --watch","format:check":"prettier --check \"./src/**/*.ts\"","publish:next":"npm publish --access public --tag next","prepublish:next":"npm run build"},"_npmUser":{"name":"brakebein","email":"bruschie@hotmail.com"},"repository":{"url":"git+https://github.com/Brakebein/nestjs-redoc.git","type":"git"},"_npmVersion":"9.5.0","description":"NestJS ReDoc frontend","directories":{},"_nodeVersion":"18.14.2","dependencies":{"@hapi/joi":"^17.1.1","@nestjs/common":"^10.0.0","@nestjs/swagger":"^7.0.0","express-basic-auth":"^1.2.1","express-handlebars":"^6.0.6"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","rxjs":"^7.2.0","husky":"^8.0.1","eslint":"^8.21.0","rimraf":"^3.0.2","ts-jest":"^28.0.7","ts-node":"^10.0.0","prettier":"^2.7.1","supertest":"^6.2.4","commitizen":"^4.2.5","typescript":"^4.3.5","@types/jest":"^28.1.6","@types/node":"^18.6.4","@nestjs/core":"^10.0.0","@types/express":"^4.17.13","@commitlint/cli":"^17.0.3","@nestjs/testing":"^10.0.0","@types/hapi__joi":"^17.1.8","@types/supertest":"^2.0.12","reflect-metadata":"^0.1.13","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@nestjs/platform-express":"^10.0.0","@nestjs/platform-fastify":"^10.0.0","@types/express-handlebars":"^6.0.0","@typescript-eslint/parser":"^5.32.0","@commitlint/config-conventional":"^17.0.3","@typescript-eslint/eslint-plugin":"^5.32.0"},"peerDependencies":{"@nestjs/core":"^10.0.0","@nestjs/common":"^10.0.0","@nestjs/swagger":"^7.0.0","reflect-metadata":"^0.1.12"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-redoc_2.4.0_1699528466872_0.288246680988107","host":"s3://npm-registry-packages"}},"2.5.0":{"name":"@brakebein/nestjs-redoc","version":"2.5.0","description":"NestJS ReDoc frontend","repository":{"type":"git","url":"git+https://github.com/Brakebein/nestjs-redoc.git"},"author":{"name":"Alfonso Reyes"},"contributors":[{"name":"Brakebein"}],"main":"dist/index.js","private":false,"license":"MIT","scripts":{"prebuild":"rimraf ./dist","build":"tsc -p ./tsconfig.build.json","format":"prettier --write \"./src/**/*.ts\"","format:check":"prettier --check \"./src/**/*.ts\"","lint":"eslint \"./src/**/*.ts\" --fix","prepublish:next":"npm run build","publish:next":"npm publish --access public --tag next","prepublish":"npm run build","publish":"npm publish --access public","test":"jest","test:watch":"jest --watch","sample":"ts-node ./sample/main"},"peerDependencies":{"@nestjs/common":"^11.0.0","@nestjs/core":"^11.0.0","@nestjs/swagger":"^11.0.0","reflect-metadata":"^0.1.12"},"dependencies":{"express-basic-auth":"^1.2.1","express-handlebars":"^8.0.1","joi":"^17.13.3"},"devDependencies":{"@commitlint/cli":"^19.8.0","@commitlint/config-conventional":"^19.8.0","@nestjs/common":"^11.0.0","@nestjs/core":"^11.0.0","@nestjs/platform-express":"^11.0.0","@nestjs/platform-fastify":"^11.0.0","@nestjs/swagger":"^11.0.0","@nestjs/testing":"^11.0.0","@types/express":"^4.17.13","@types/jest":"^29.5.14","@types/node":"^22.13.10","@types/supertest":"^6.0.2","@typescript-eslint/eslint-plugin":"^5.32.0","@typescript-eslint/parser":"^5.32.0","commitizen":"^4.3.1","eslint":"^8.21.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","husky":"^9.1.7","jest":"^29.7.0","prettier":"^3.5.3","reflect-metadata":"^0.1.13","rimraf":"^6.0.1","rxjs":"^7.2.0","supertest":"^7.0.0","ts-jest":"^29.2.6","ts-node":"^10.9.2","typescript":"^4.3.5"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"_id":"@brakebein/nestjs-redoc@2.5.0","gitHead":"782bd2434a201d353f3c560d3fc6195055ae742c","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/Brakebein/nestjs-redoc/issues"},"homepage":"https://github.com/Brakebein/nestjs-redoc#readme","_nodeVersion":"20.12.2","_npmVersion":"10.9.2","dist":{"integrity":"sha512-epeHpVeH5fjHuKxD1iyF4BgHJeooDHq/86V/OU2NOnnyAc7mU2+Yg3qzqbrGRGlKUs/jeUa4F+aqlcadIu6IMQ==","shasum":"95f8a248961a485b9b6b77c795f7f115cd9710d8","tarball":"https://registry.npmjs.org/@brakebein/nestjs-redoc/-/nestjs-redoc-2.5.0.tgz","fileCount":18,"unpackedSize":28329,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCdXE/fAKlbv/pTrg88sOHMIlNkPWXWzfObRUPiWrSpEwIhAOFTB+w87f24Do5O7PsAc3vfWpXY4a8nHIhmqVU2oO2e"}]},"_npmUser":{"name":"brakebein","email":"bruschie@hotmail.com"},"directories":{},"maintainers":[{"name":"brakebein","email":"bruschie@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nestjs-redoc_2.5.0_1741886422664_0.10766439228970581"},"_hasShrinkwrap":false}},"time":{"created":"2022-09-21T13:11:11.676Z","modified":"2025-03-13T17:20:23.051Z","2.3.0":"2022-09-21T13:11:11.940Z","2.4.0":"2023-11-09T11:14:27.320Z","2.5.0":"2025-03-13T17:20:22.861Z"},"bugs":{"url":"https://github.com/Brakebein/nestjs-redoc/issues"},"author":{"name":"Alfonso Reyes"},"license":"MIT","homepage":"https://github.com/Brakebein/nestjs-redoc#readme","repository":{"type":"git","url":"git+https://github.com/Brakebein/nestjs-redoc.git"},"description":"NestJS ReDoc frontend","maintainers":[{"name":"brakebein","email":"bruschie@hotmail.com"}],"readme":"<h1 align=\"center\">\n  NestJS-Redoc\n  <h4 align=\"center\">ReDoc powered frontend for your NestJS API spec</h4>\n</h1>\n\n<div align=\"center\">\n  <a href=\"http://makeapullrequest.com\">\n    <img src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\" alt=\"PRs welcome\" />\n  </a>\n  <a href=\"https://github.com/nestjs/nest\">\n    <img src=\"https://raw.githubusercontent.com/nestjsx/crud/e9f8424c8d5bbec3b7d6f827abecaa07ced86091/img/nest-powered.svg?sanitize=true\" alt=\"Nest Powered\" />\n  </a>\n   <a href=\"https://opensource.org/licenses/MIT\"><img src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"MIT license\"></a>\n</div>\n\n<div align=\"center\">\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</div>\n\n![](redoc.png)\n\n<p align=\"center\">\n\n📒 This is a [ReDoc](https://github.com/Redocly/redoc) powered frontend for your NestJS API spec.\n\n</p>\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: <https://github.com/Redocly/redoc/blob/master/src/theme.ts>\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- 2.3.0 - Updated to support Nest 9, removed padding from logo image\n- 2.4.0 - Updated to support Nest 10\n- 2.5.0 - Updated to support Nest 11\n\n## 📋 ToDo\n\n- Add Fastify support\n- Add the option to use a spec URL instead of document\n- Fix tests\n","readmeFilename":"README.md","contributors":[{"name":"Brakebein"}]}