
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@aledavidgueva/nestjs-schemas
Advanced tools
WARNING: Be careful, this documentation is under construction
import { ApiProperty } from '@nestjs/swagger';
import { $Schema, $Prop } from 'nestjs-metadata-storage';
export enum StatusEnum {
DRAFT = 'DRAFT',
PUBLISHED = 'PUBLISHED',
}
@$Schema({
mongoose: {
timestamps: true,
collection: 'dummy',
},
metadata: {
customInfo: 'Custom string',
},
})
export class Dummy {
@$Prop()
_id: string;
@$Prop({
mongoose: { type: Schema.Types.String, default: null }
swagger: { type: String, required: false },
})
category: string | null;
@$Prop()
question: string;
@$Prop()
answer: string;
@$Prop({
type: 'StatusEnum',
enum: StatusEnum,
})
status: StatusEnum;
@$Prop()
position: number;
}
MetadataModule in AppModuleimport { Module } from '@nestjs/common';
import { MetadataModule } from 'nestjs-metadata-storage';
import { AppController } from './app.controller';
import { AppService } from './app.service';
@Module({
imports: [MetadataModule],
controllers: [AppController],
providers: [AppService],
})
export class AppModule {}
import { Controller, Get } from '@nestjs/common';
import { Dummy } from './schemas/faq.dto';
import { MetadataService } from 'nestjs-metadata-storage';
import { ApiExtraModels } from '@nestjs/swagger';
@Controller()
export class AppController {
constructor(private readonly _metadata: MetadataService) {}
@Get()
@ApiExtraModels(Dummy)
test() {
console.log(this._metadata.getSchemas());
}
}
import { IntersectionType, PartialType, $Prop, $Schema } from 'nestjs-metadata-storage';
import { Faq } from './faq.dto';
import { Plan } from './plan.dto';
import { Payment } from './payment.dto';
@$Schema({
metadata: {
customInfo: 'Custom string',
},
})
export class FaqExtended extends IntersectionType(Faq, Plan, PartialType(Payment)) {
@$Prop({
swagger: { type: String, required: false },
})
extra: string | null;
}
$Schema decorator is optional.@nestjs/swagger is required.MetadataModule is global module.FAQs
Metadata storage for schemas
We found that @aledavidgueva/nestjs-schemas demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.