
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@smartive/giuseppe-swagger-plugin
Advanced tools
This is a plugin for giuseppe.
To install this package, simply run
Here is a brief example of how to add the plugin to giuseppe:
import { Giuseppe } from 'giuseppe';
import { GiuseppeSwaggerPlugin } from 'giuseppe-swagger-plugin';
const app = new Giuseppe();
app.registerPlugin(new GiuseppeSwaggerPlugin());
app.start();
This is how to enrich a Giuseppe controller with swagger annotations:
@Controller()
class Ctrl2 {
@SwaggerRoute({
description: 'A route',
responses: {
200: {
description: 'Response description',
type: Model,
},
},
})
@Get('route')
getRoute(
@Query('a')
a: string,
@SwaggerParam({
default: 10,
description: 'Parameter b',
})
@Query('b')
b: number,
@SwaggerParam({
type: Model
})
@Query('c')
c: Model,
@SwaggerParam({
type: Number
})
@Query('d')
d: number[],
@SwaggerParam({
type: Model
})
@Query('e')
e: Model[],
@Header('f')
f: string,
): Model {
return new Model();
}
}
This is how to enrich a model with swagger annotations:
@SwaggerObject({
description: 'A model',
})
class Model {
@SwaggerField({
required: true,
})
a: string;
@SwaggerField()
b: number;
@SwaggerField({
type: Other,
})
c: Model;
@SwaggerField({
type: Number
})
d: number[];
@SwaggerField({
type: Other
})
e: Other[];
}
This is how to generate the swagger json:
import { SwaggerDocs } from 'giuseppe-swagger-plugin';
@Controller()
class Ctrl {
@SwaggerDocs('swagger', {
info: {
description: 'A test swagger route.',
title: 'Swagger',
version: '1.0.0',
},
})
public getSwagger(): void { }
}
The schema can be forced to adhere to swagger 2.
The changelog is generated by semantic release and is located under the release section.
This software is licenced under the MIT licence.
FAQs
Swagger documentation generator
The npm package @smartive/giuseppe-swagger-plugin receives a total of 405 weekly downloads. As such, @smartive/giuseppe-swagger-plugin popularity was classified as not popular.
We found that @smartive/giuseppe-swagger-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.