File
Public
creator_user_id
|
Type : number
|
Decorators :
@ApiProperty({description: 'Endorsement Creator User ID', type: 'integer', example: 42211}) @IsNumber()
|
|
Public
recipient_user_id
|
Type : number
|
Decorators :
@ApiProperty({description: 'Endorsement Recipient User ID', type: 'integer', example: 5736810}) @IsNumber()
|
|
Public
repo_id
|
Type : number
|
Decorators :
@ApiProperty({description: 'Repository ID', type: 'integer', example: 78133}) @IsNumber()
|
|
Public
Optional
source_comment_url
|
Type : string
|
Decorators :
@ApiPropertyOptional({description: 'Endorsement Source Comment URL', default: ''}) @IsString() @IsOptional()
|
|
Public
source_context_url
|
Type : string
|
Decorators :
@ApiProperty({description: 'Endorsement Source Context URL', example: 'https://github.com/open-sauced/insights/pulls'}) @IsString()
|
|
Public
type
|
Type : string
|
Decorators :
@ApiProperty({description: 'Endorsement Type', example: 'doc'}) @IsString()
|
|
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import { IsString, IsNumber, IsOptional } from "class-validator";
export class CreateEndorsementDto {
@ApiProperty({
description: "Endorsement Creator User ID",
type: "integer",
example: 42211,
})
@IsNumber()
public creator_user_id: number;
@ApiProperty({
description: "Endorsement Recipient User ID",
type: "integer",
example: 5736810,
})
@IsNumber()
public recipient_user_id: number;
@ApiProperty({
description: "Repository ID",
type: "integer",
example: 78133,
})
@IsNumber()
public repo_id: number;
@ApiPropertyOptional({
description: "Endorsement Source Comment URL",
default: "",
})
@IsString()
@IsOptional()
public source_comment_url?: string;
@ApiProperty({
description: "Endorsement Source Context URL",
example: "https://github.com/open-sauced/insights/pulls",
})
@IsString()
public source_context_url: string;
@ApiProperty({
description: "Endorsement Type",
example: "doc",
})
@IsString()
public type: string;
}