Gathering detailed insights and metrics for nestjs-asyncapi
Gathering detailed insights and metrics for nestjs-asyncapi
Gathering detailed insights and metrics for nestjs-asyncapi
Gathering detailed insights and metrics for nestjs-asyncapi
NestJS AsyncAPI module - generate documentation of your event-based services using decorators
npm install nestjs-asyncapi
Typescript
Module System
Node Version
NPM Version
TypeScript (98.45%)
JavaScript (1.36%)
Shell (0.19%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
215 Stars
970 Commits
37 Forks
3 Watchers
33 Branches
5 Contributors
Updated on Jul 13, 2025
Latest Version
1.4.0
Package Id
nestjs-asyncapi@1.4.0
Unpacked Size
1.63 MB
Size
355.20 kB
File Count
260
NPM Version
10.5.2
Node Version
20.13.1
Published on
Mar 09, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
33
Generate AsyncApi documentation (for event-based services, like websockets) in a similar to nestjs/swagger fashion.
full installation (with chromium)
1$ npm i --save nestjs-asyncapi
nestjs-async api package doesn't require chromium (which is required by asyncapi lib), so u can skip chromium installation by setting PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true environment variable.
1$ PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm i --save nestjs-asyncapi
Include AsyncApi initialization into your bootstrap function.
1async function bootstrap() { 2 const app = await NestFactory.create<NestExpressApplication>(AppModule); 3 4 const asyncApiOptions = new AsyncApiDocumentBuilder() 5 .setTitle('Feline') 6 .setDescription('Feline server description here') 7 .setVersion('1.0') 8 .setDefaultContentType('application/json') 9 .addSecurity('user-password', {type: 'userPassword'}) 10 .addServer('feline-ws', { 11 url: 'ws://localhost:3000', 12 protocol: 'socket.io', 13 }) 14 .build(); 15 16 const asyncapiDocument = await AsyncApiModule.createDocument(app, asyncApiOptions); 17 await AsyncApiModule.setup(docRelPath, app, asyncapiDocument); 18 19 // other bootstrap procedures here 20 21 return app.listen(3000); 22}
AsyncApi module explores Controllers
& WebSocketGateway
by default.
In most cases you won't need to add extra annotation,
but if you need to define asyncApi operations in a class that's not a controller or gateway use the AsyncApi
class
decorator.
Mark pub/sub methods via AsyncApiPub
or AsyncApiSub
decorators
1class CreateFelineDto { 2 @ApiProperty() 3 demo: string; 4} 5 6@Controller() 7class DemoController { 8 @AsyncApiPub({ 9 channel: 'create/feline', 10 message: { 11 payload: CreateFelineDto 12 }, 13 }) 14 async createFeline() { 15 // logic here 16 } 17 18 @AsyncApiSub({ 19 channel: 'create/feline', 20 message: { 21 payload: CreateFelineDto 22 }, 23 }) 24 async createFeline() { 25 // logic here 26 } 27} 28
For more detailed examples please check out https://github.com/flamewow/nestjs-asyncapi/tree/main/sample sample app.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
Found 0/4 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
19 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More