We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
export class CreateNotificationReq { @rule(RuleType.string().max(32).required()) @ApiProperty({ example: '关于xxx的通知', description: '通知标题', maxLength: 32, required: true, }) title: string;
@rule(RuleType.string().max(1024).required()) @ApiProperty({ example: '今天天气不错,我们决定春游', description: '通知内容', maxLength: 512, }) content: string; }
export class UpdateNotificationReq extends CreateNotificationReq { @rule(RuleType.number().required()) @ApiProperty({ example: 1, description: '通知的id', required: true }) id: number; } 如上代码,修改时比新增时多了一个id属性
但是修改的却是这个样子的
,经过阅读代码,发现生成swagger多了一个删除required的逻辑,不知道是有什么用意还是什么,如果手动删除掉就可以继承了
The text was updated successfully, but these errors were encountered:
No branches or pull requests
export class CreateNotificationReq {
@rule(RuleType.string().max(32).required())
@ApiProperty({
example: '关于xxx的通知',
description: '通知标题',
maxLength: 32,
required: true,
})
title: string;
@rule(RuleType.string().max(1024).required())
@ApiProperty({
example: '今天天气不错,我们决定春游',
description: '通知内容',
maxLength: 512,
})
content: string;
}
export class UpdateNotificationReq extends CreateNotificationReq {
@rule(RuleType.number().required())
@ApiProperty({ example: 1, description: '通知的id', required: true })
id: number;
}
如上代码,修改时比新增时多了一个id属性
但是修改的却是这个样子的
,经过阅读代码,发现生成swagger多了一个删除required的逻辑,不知道是有什么用意还是什么,如果手动删除掉就可以继承了
The text was updated successfully, but these errors were encountered: