Skip to content

Commit

Permalink
add missing swagger types
Browse files Browse the repository at this point in the history
  • Loading branch information
nimarion committed Oct 31, 2024
1 parent a90051e commit db98dd1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/athlete_representatives/athlete_representative.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { ApiProperty } from '@nestjs/swagger';
export class AthleteRepresentative {
@ApiProperty()
id!: number;
@ApiProperty({ nullable: true })
@ApiProperty({ nullable: true, type: String })
country!: string | null;
@ApiProperty()
firstname!: string;
@ApiProperty()
lastname!: string;
@ApiProperty({ nullable: true })
@ApiProperty({ nullable: true, type: String })
email!: string | null;
@ApiProperty({ nullable: true })
@ApiProperty({ nullable: true, type: String })
phone!: string | null;
}
3 changes: 2 additions & 1 deletion src/athletes/athlete.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ export class BaseAthlete {
}

export class BasePerformance extends Discipline {
@ApiProperty()
@ApiProperty({ nullable: true, type: Date })
date!: Date | null;
@ApiProperty()
mark!: string;
@ApiProperty({
description:
'Performance in milliseconds for track events and centimeters for field events',
nullable: true,
type: Number,
})
performanceValue!: number | null;
@ApiProperty()
Expand Down
12 changes: 6 additions & 6 deletions src/competitions/competition.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ export class ContactPerson {
email!: string;
@ApiProperty()
name!: string;
@ApiProperty()
@ApiProperty({ nullable: true, type: String })
phone!: string | null;
@ApiProperty()
role!: string;
}

export class CompetitionOrganiserInfo {
@ApiProperty({ nullable: true })
@ApiProperty({ nullable: true, type: String })
websiteUrl!: string | null;
@ApiProperty({ nullable: true })
@ApiProperty({ nullable: true, type: String })
liveStreamUrl!: string | null;
@ApiProperty({ nullable: true })
@ApiProperty({ nullable: true, type: String })
resultsUrl!: string | null;
@ApiProperty({ type: [ContactPerson] })
contactPersons!: ContactPerson[];
Expand All @@ -42,9 +42,9 @@ export class Competition {
start!: Date;
@ApiProperty()
end!: Date;
@ApiProperty({ nullable: true })
@ApiProperty({ nullable: true, type: String })
competitionGroup!: string | null;
@ApiProperty({ nullable: true })
@ApiProperty({ nullable: true, type: String })
competitionSubgroup!: string | null;
@ApiProperty()
hasResults!: boolean;
Expand Down

0 comments on commit db98dd1

Please sign in to comment.