Skip to content

Commit

Permalink
chore: set not null props in swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
mdwitr0 committed Dec 23, 2023
1 parent eea0c75 commit 84dd0b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/movie/dto/v1.4/movie-find-one-params.dto.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { IsOptional, Validate } from 'class-validator';
import { ApiNullableProperty } from '../../../common/decorators/api-nullable-property.decorator';
import { IsNumberParam } from '../../../common/validation/is-number-param';
import { IsValueInRange } from '../../../common/validation/is-value-in-range';
import { ToArray } from '../../../common/decorators/transform/to-array.decorator';
import { ApiProperty } from '@nestjs/swagger';

export class MovieFindOneParamsDtoV1_4 {
@ApiNullableProperty({ isArray: true, description: 'ID из кинопоиска' })
@ApiProperty({ required: true, description: 'ID из кинопоиска' })
@IsOptional()
@ToArray()
@Validate(IsValueInRange, [250, 7000000])
Expand Down
4 changes: 2 additions & 2 deletions src/person/dto/v1.4/person-find-one-params.dto.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { IsOptional, Validate } from 'class-validator';
import { ApiNullableProperty } from '../../../common/decorators/api-nullable-property.decorator';
import { IsNumberParam } from '../../../common/validation/is-number-param';
import { IsValueInRange } from '../../../common/validation/is-value-in-range';
import { ToArray } from '../../../common/decorators/transform/to-array.decorator';
import { ApiProperty } from '@nestjs/swagger';

export class PersonFindOneParamsDtoV1_4 {
@ApiNullableProperty({ isArray: true, description: 'ID из кинопоиска' })
@ApiProperty({ required: true, description: 'ID из кинопоиска' })
@IsOptional()
@ToArray()
@Validate(IsValueInRange, [1, 30000000])
Expand Down

0 comments on commit 84dd0b7

Please sign in to comment.