NestJS使用openapi添加安全性

NestJS使用openapi添加安全性,nestjs,Nestjs,我正试图用开放API在nestJS中加强安全性 因此,用户必须作为API调用的一部分传入API-ACCESS-KEY头 我发现的唯一例子是: const options = new DocumentBuilder() .setTitle('Web Service') .setVersion('1.0') .addSecurity('SYSTEM', {type: 'apiKey', name: 'API-ACCESS-KEY'}) .build(); 但我应该在哪里传递实际值 我在Cont

我正试图用开放API在nestJS中加强安全性 因此,用户必须作为API调用的一部分传入API-ACCESS-KEY头

我发现的唯一例子是:

  const options = new DocumentBuilder()
.setTitle('Web Service')
.setVersion('1.0')
.addSecurity('SYSTEM', {type: 'apiKey', name: 'API-ACCESS-KEY'})
.build();
但我应该在哪里传递实际值

我在Controller方法中添加了以下decorator

@ApiBasicAuth('SYSTEM'), but it doesn't work.
不知道我做错了什么