Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update nest monorepo to v8 (major) #99

Merged
merged 1 commit into from
Dec 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
176 changes: 88 additions & 88 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
19 changes: 13 additions & 6 deletions lib/services/swagger-explorer.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from '@nestjs/common';
import { MODULE_PATH } from '@nestjs/common/constants';
import { ModulesContainer } from '@nestjs/core';
import { ModulesContainer, ApplicationConfig } from '@nestjs/core';
import { Module } from '@nestjs/core/injector/module';
import { OpenAPIObject } from '@nestjs/swagger/dist/interfaces';
import { SwaggerScanner } from '@nestjs/swagger/dist/swagger-scanner';
Expand All @@ -20,7 +20,10 @@ import { flatten } from '../utils';
export class SwaggerExplorerServices {
private _scanner = new SwaggerScanner();

constructor(private readonly _modulesContainer: ModulesContainer) {}
constructor(
private readonly _modulesContainer: ModulesContainer,
private readonly _applicationConfig: ApplicationConfig,
) {}

public explore(): PathsSchemas {
const { paths } = this.scanApplication();
Expand Down Expand Up @@ -55,7 +58,12 @@ export class SwaggerExplorerServices {
const allRoutes = new Map(routes);
const path = Reflect.getMetadata(MODULE_PATH, metatype);

return this._scanner.scanModuleRoutes(allRoutes, path);
return this._scanner.scanModuleRoutes(
allRoutes,
path,
this._applicationConfig.getGlobalPrefix(),
this._applicationConfig,
);
});

return (this._scanner as any).transfomer.normalizePaths(
Expand Down Expand Up @@ -105,9 +113,8 @@ export class SwaggerExplorerServices {
}
return Object.entries(responses).reduce(
(responsesJsonSchemas, [statusCode, responseObject]) => {
const isNotReferenceObject = this.filterNotReferenceObject()(
responseObject,
);
const isNotReferenceObject =
this.filterNotReferenceObject()(responseObject);
if (!isNotReferenceObject) {
return responsesJsonSchemas;
}
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
"@commitlint/cli": "15.0.0",
"@commitlint/config-angular": "15.0.0",
"@istanbuljs/nyc-config-typescript": "1.0.2",
"@nestjs/common": "7.6.18",
"@nestjs/core": "7.6.18",
"@nestjs/platform-express": "7.6.18",
"@nestjs/swagger": "4.8.2",
"@nestjs/testing": "7.6.18",
"@nestjs/common": "8.2.3",
"@nestjs/core": "8.2.3",
"@nestjs/platform-express": "8.2.3",
"@nestjs/swagger": "5.1.5",
"@nestjs/testing": "8.2.3",
"@release-it/conventional-changelog": "3.3.0",
"@types/chai": "4.2.22",
"@types/mocha": "9.0.0",
Expand Down Expand Up @@ -77,9 +77,9 @@
"typescript": "4.5.2"
},
"peerDependencies": {
"@nestjs/common": "^6.0.0 || ^7.0.0",
"@nestjs/core": "^6.0.0 || ^7.0.0",
"@nestjs/swagger": "^4.7.15",
"@nestjs/common": "^6.0.0 || ^7.0.0 || ^8.0.0",
"@nestjs/core": "^6.0.0 || ^7.0.0 || ^8.0.0",
"@nestjs/swagger": "^4.7.15 || ^5.0.0",
"ajv": "^8.6.0",
"reflect-metadata": "^0.1.12",
"rxjs": "^6.0.0 || ^7.0.0"
Expand Down
166 changes: 83 additions & 83 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.