class-validator-jsonschema
class-validator-jsonschema copied to clipboard
feat: add option doNotExcludeDecorator
I have encountered a problem. I have a Dto that has a field decorated by Exclude, but I don't want it to disappear from the JsonSchema.
export class TerminalOptionsDto {
@IsOptional()
@IsBoolean()
enable: boolean
@IsOptional()
@IsString()
@Transform(({ value }) =>
typeof value == 'string' && value.length == 0 ? null : value,
)
@Exclude({ toPlainOnly: true, })
@JSONSchema({ format: 'password', type: 'string', title: '密码' })
password?: string
@IsOptional()
@IsString()
script?: string
}
The password is disappear in JSONSchema, but I need it.
So, can add option to disable this feature?