@nestjs/swagger#PickType TypeScript Examples
The following examples show how to use
@nestjs/swagger#PickType.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: mentor.dto.ts From codeclannigeria-backend with MIT License | 6 votes |
export class MentorDto extends PickType(UserDto, [
'firstName',
'lastName',
'technologies',
'photoUrl',
'description',
'id',
'city',
'country',
'description',
'phoneNumber',
'gender',
'email',
'tracks'
]) {}
Example #2
Source File: mentor-mentee.dto.ts From codeclannigeria-backend with MIT License | 6 votes |
// const applyMixins = (derivedCtor: any, baseCtors: any[]) => {
// baseCtors.forEach((baseCtor) => {
// Object.getOwnPropertyNames(baseCtor.prototype).forEach((name) => {
// if (name !== 'constructor') {
// derivedCtor.prototype[name] = baseCtor.prototype[name];
// }
// });
// });
// };
export class SimpleTrackDto extends PickType(TrackDto, ['title', 'id']) {}
Example #3
Source File: get-profile.dto.ts From codeclannigeria-backend with MIT License | 6 votes |
export class GetUserDto extends PickType(UserDto, [
'firstName',
'lastName',
'technologies',
'description',
'id',
'city',
'country',
'description',
'gender',
'tracks'
]) {}
Example #4
Source File: create-stage.dto.ts From codeclannigeria-backend with MIT License | 6 votes |
export class CreateStageDto extends PickType(StageDto, [
'title',
'description',
'taskCount',
'level'
]) {
@IsMongoId()
@Expose()
track: string;
}
Example #5
Source File: acct-verification.dto.ts From codeclannigeria-backend with MIT License | 5 votes |
export class AcctVerifyDto extends PickType(LoginReqDto, ['email']) {
@IsUrl()
clientBaseUrl: string;
@IsNotEmpty()
tokenParamName: string;
@IsNotEmpty()
emailParamName: string;
}
Example #6
Source File: auth.dto.ts From codeclannigeria-backend with MIT License | 5 votes |
export class LoginReqDto extends PickType(RegisterUserDto, [
'email',
'password'
]) {}
Example #7
Source File: validate-token.dto.ts From codeclannigeria-backend with MIT License | 5 votes |
export class ValidateTokenInput extends PickType(LoginReqDto, ['email']) {
@IsNotEmpty()
token: string;
}
Example #8
Source File: create-category.dto.ts From codeclannigeria-backend with MIT License | 5 votes |
export class CreateCategoryDto extends PickType(CategoryDto, [
'name',
'description'
]) {}
Example #9
Source File: create-course.dto.ts From codeclannigeria-backend with MIT License | 5 votes |
export class CreateCourseDto extends PickType(CourseDto, [
'title',
'description',
'playlistUrl'
]) {}
Example #10
Source File: create-subission.dto.ts From codeclannigeria-backend with MIT License | 5 votes |
export class CreateSubmissionDto extends PickType(SubmissionDto, ['menteeComment', 'taskUrl']) { }
Example #11
Source File: grade-submission.dto.ts From codeclannigeria-backend with MIT License | 5 votes |
export class GradeSubmissionDto extends PickType(SubmissionDto, ['gradePercentage', 'mentorComment']) { }
Example #12
Source File: submission.dto.ts From codeclannigeria-backend with MIT License | 5 votes |
export class SimpleUserDto extends PickType(UserDto, [
'firstName',
'lastName',
'id'
]) {}
Example #13
Source File: submission.dto.ts From codeclannigeria-backend with MIT License | 5 votes |
export class SimpleTaskDto extends PickType(TaskDto, ['title', 'id']) {}
Example #14
Source File: register-user.dto.ts From codeclannigeria-backend with MIT License | 5 votes |
export class RegisterUserDto extends PickType(UserDto, [
'firstName',
'lastName',
'email'
]) {
@MinLength(6)
password: string;
}