Skip to content

Commit 57d83b4

Browse files
committed
swagger optional fields fix
1 parent 09ebac8 commit 57d83b4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/builds/dto/build.dto.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
import { ApiProperty } from '@nestjs/swagger';
1+
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
22
import { Build, TestRun, TestStatus } from '@prisma/client';
33

44
export class BuildDto {
55
@ApiProperty()
66
id: string;
77

8-
@ApiProperty()
9-
ciBuildId: string | null;
8+
@ApiPropertyOptional()
9+
ciBuildId?: string;
1010

1111
@ApiProperty()
12-
number: number | null;
12+
number: number;
1313

1414
@ApiProperty()
15-
branchName: string | null;
15+
branchName: string;
1616

1717
@ApiProperty()
18-
status: string | null;
18+
status: string;
1919

2020
@ApiProperty()
2121
projectId: string;
@@ -26,8 +26,8 @@ export class BuildDto {
2626
@ApiProperty()
2727
createdAt: Date;
2828

29-
@ApiProperty()
30-
userId: string | null;
29+
@ApiPropertyOptional()
30+
userId?: string;
3131

3232
@ApiProperty()
3333
passedCount: number;

0 commit comments

Comments
 (0)