我正在尝试将swagger添加到我的nestjs应用程序中,这是我得到的一个错误。
(node:78477) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined
at lodash_1.mapValues.param (/Users/anna/SoFetch/node_modules/@nestjs/swagger/dist/explorers/api-parameters.explorer.js:34:20)
at /Users/anna/SoFe
当我将@nest/swagger库更新到版本4时,发生了以下错误:
(node:16134) UnhandledPromiseRejectionWarning: Error: A circular dependency has been detected (property key: "customer"). Please, make sure that each side of a bidirectional relationships are using lazy resolvers ("type: () => ClassType").
at
我想要的
我正在使用NestJS实现一个删除路由。
由于该路由仅在成功删除时才返回HTTP 204 No Content,因此我使用@nestjs/swagger装饰器对其进行了如下注释:
@ApiParam({
name: 'id',
required: true,
type: 'string',
example: 'abc123',
})
@ApiNoContentResponse({
description: 'All items for the given id have been deleted',
我正在使用一个很棒的库:
整个追溯过程如下:
(node:22654) UnhandledPromiseRejectionWarning: Error: A circular dependency has been detected (property key: "firstName"). Please, make sure that each side of a bidirectional relationships are using lazy resolvers ("type: () => ClassType").
at SchemaObje
我正试图按照文档使用@nestjs/swagger安装npm i @nestjs/swagger。
我得到以下错误:
npm ERR! Could not resolve dependency:
npm ERR! peer @nestjs/common@"^9.0.0" from @nestjs/swagger@6.0.3
你知道这是怎么回事吗?我看到这个包是几个小时前最后一次发表的,不知道是否相关。
我正在尝试用NestJS为文件上传API创建swagger文档。
这是我目前在我的控制器中拥有的:
@ApiTags('files')
@Controller('files')
export class FilesController {
@ApiConsumes('multipart/form-data')
@ApiCreatedResponse({description: "This api creates a file in the system"})
@Post('upload')
我在npm依赖项的类型记录中工作。
理论:
假设是一个库A和两个项目B和C
我的库A使用B中所需的依赖项,但在C中不使用
如何在项目B中安装此依赖项,但在C中却没有编译错误?
project B
|----library A
|----library D
project C
|----library A
library A
|----library D
实用:
由于我可能在错误的轨道上,这里是具体的情况!我是在一个项目与一个角前端和雀巢后端。我创建了一个公共库,其中包含DTO。我想使用来自@ApiProperty()的@nestjs/swagger注释。但是我不想在我的@nestj