Skip to content

Commit

Permalink
Add custom js to nestjs swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreasgdp committed May 6, 2023
1 parent 15c13a7 commit 5ed81f1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
4 changes: 4 additions & 0 deletions apps/api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ async function bootstrap() {
SwaggerModule.setup('api', app, document, {
customCssUrl:
'https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.15.5/swagger-ui.min.css',
customJs: [
'https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.15.5/swagger-ui-bundle.js',
'https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.15.5/swagger-ui-standalone-preset.js',
],
});

await app.listen(port);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"@nestjs/mapped-types": "*",
"@nestjs/passport": "^9.0.3",
"@nestjs/platform-express": "9.0.0",
"@nestjs/swagger": "6.0.0",
"@nestjs/swagger": "6.3.0",
"@nrwl/angular": "15.3.0",
"@prisma/client": "^4.13.0",
"bcrypt": "^5.1.0",
Expand Down
28 changes: 14 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2675,10 +2675,10 @@
resolved "https://registry.yarnpkg.com/@nestjs/mapped-types/-/mapped-types-1.1.0.tgz#54a9fa61079635dd6c3c75fd9593f20b2302a55b"
integrity sha512-+2kSly4P1QI+9eGt+/uGyPdEG1hVz7nbpqPHWZVYgoqz8eOHljpXPag+UCVRw9zo2XCu4sgNUIGe8Uk0+OvUQg==

"@nestjs/mapped-types@1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@nestjs/mapped-types/-/mapped-types-1.0.1.tgz#78b62041c7a407db4a90eb140567321602bed18e"
integrity sha512-NFvofzSinp00j5rzUd4tf+xi9od6383iY0JP7o0Bnu1fuItAUkWBgc4EKuIQ3D+c2QI3i9pG1kDWAeY27EMGtg==
"@nestjs/mapped-types@1.2.2":
version "1.2.2"
resolved "https://registry.yarnpkg.com/@nestjs/mapped-types/-/mapped-types-1.2.2.tgz#d9ddb143776e309dbc1a518ac1607fddac1e140e"
integrity sha512-3dHxLXs3M0GPiriAcCFFJQHoDFUuzTD5w6JDhE7TyfT89YKpe6tcCCIqOZWdXmt9AZjjK30RkHRSFF+QEnWFQg==

"@nestjs/passport@^9.0.3":
version "9.0.3"
Expand Down Expand Up @@ -2718,16 +2718,16 @@
jsonc-parser "3.0.0"
pluralize "8.0.0"

"@nestjs/swagger@6.0.0":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@nestjs/swagger/-/swagger-6.0.0.tgz#49c1f6c25a0469053a9fc004bf92ffad84708879"
integrity sha512-yHyEPuQCo5+M9krZYhwH5jjtBIMHJIVbvL3nO5ufqwTjEnDC1GqP75ziMBPG3ffu7akWAmVWZPIA2xVcHiqw2Q==
"@nestjs/swagger@6.3.0":
version "6.3.0"
resolved "https://registry.yarnpkg.com/@nestjs/swagger/-/swagger-6.3.0.tgz#2963395a398374c25548a012eb15f03f53ad6e53"
integrity sha512-Gnig189oa1tD+h0BYIfUwhp/wvvmTn6iO3csR2E4rQrDTgCxSxZDlNdfZo3AC+Rmf8u0KX4ZAX1RZN1qXTtC7A==
dependencies:
"@nestjs/mapped-types" "1.0.1"
"@nestjs/mapped-types" "1.2.2"
js-yaml "4.1.0"
lodash "4.17.21"
path-to-regexp "3.2.0"
swagger-ui-dist "4.12.0"
swagger-ui-dist "4.18.2"

"@nestjs/[email protected]":
version "9.1.4"
Expand Down Expand Up @@ -17070,10 +17070,10 @@ svgo@^2.7.0:
picocolors "^1.0.0"
stable "^0.1.8"

swagger-ui-dist@4.12.0:
version "4.12.0"
resolved "https://registry.yarnpkg.com/swagger-ui-dist/-/swagger-ui-dist-4.12.0.tgz#986d90f05e81fb9db3ca40372278a5d8ce71db3a"
integrity sha512-B0Iy2ueXtbByE6OOyHTi3lFQkpPi/L7kFOKFeKTr44za7dJIELa9kzaca6GkndCgpK1QTjArnoXG+aUy0XQp1w==
swagger-ui-dist@4.18.2:
version "4.18.2"
resolved "https://registry.yarnpkg.com/swagger-ui-dist/-/swagger-ui-dist-4.18.2.tgz#323308f1c1d87a7c22ce3e273c31835eb680a71b"
integrity sha512-oVBoBl9Dg+VJw8uRWDxlyUyHoNEDC0c1ysT6+Boy6CTgr2rUcLcfPon4RvxgS2/taNW6O0+US+Z/dlAsWFjOAQ==

[email protected]:
version "1.0.1"
Expand Down

2 comments on commit 5ed81f1

@vercel
Copy link

@vercel vercel bot commented on 5ed81f1 May 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

mealtime-api – ./apps/api

mealtime-api-mealtime.vercel.app
mealtime-api.vercel.app
mtapi.bhelpful.net
mealtime-api-git-master-mealtime.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 5ed81f1 May 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

mealtime – ./

mealtime-git-master-mealtime.vercel.app
mealtime-mealtime.vercel.app
mealtime.bhelpful.net

Please sign in to comment.