Skip to content

Commit bc93620

Browse files
committed
fix: not all fields are covered by decorators in persons
1 parent 76fd892 commit bc93620

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/person/person.controller.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class PersonController {
2626

2727
@Get()
2828
@ApiOperation({ summary: 'Поиск персон' })
29-
@ApiDotNotationQuery(Person, PaginatedQueryDto)
29+
@ApiDotNotationQuery(Person)
3030
@ApiResponse({ type: PersonDocsResponseDto })
3131
async finManyByQuery(
3232
@Query(ParseDotNotationQuery, ValidationPipe) dto: FindManyPersonDto,

src/person/schemas/person.schema.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ export class Person {
118118
growth: number;
119119

120120
@ApiPropertyOptional()
121-
@Prop({ index: true })
122-
birthday: Date;
121+
@Prop({ index: true, type: () => Date })
122+
birthday: string;
123123

124124
@ApiPropertyOptional()
125-
@Prop({ index: true })
126-
death: Date;
125+
@Prop({ index: true, type: () => Date })
126+
death: string;
127127

128128
@ApiPropertyOptional()
129129
@Prop({ index: true })
@@ -137,7 +137,7 @@ export class Person {
137137
@Prop({ items: DeathPlace })
138138
deathPlace: DeathPlace[];
139139

140-
@ApiPropertyOptional()
140+
@ApiPropertyOptional({ type: () => Spouses })
141141
@Prop()
142142
spouses: Spouses;
143143

0 commit comments

Comments
 (0)