From 84dd0b712b311e64f63062576c2c07e2b36427c1 Mon Sep 17 00:00:00 2001 From: Evgenii Fedoryachenko Date: Sat, 23 Dec 2023 23:56:43 +0100 Subject: [PATCH] chore: set not null props in swagger --- src/movie/dto/v1.4/movie-find-one-params.dto.ts | 4 ++-- src/person/dto/v1.4/person-find-one-params.dto.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/movie/dto/v1.4/movie-find-one-params.dto.ts b/src/movie/dto/v1.4/movie-find-one-params.dto.ts index 7e49374..8bf2136 100644 --- a/src/movie/dto/v1.4/movie-find-one-params.dto.ts +++ b/src/movie/dto/v1.4/movie-find-one-params.dto.ts @@ -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]) diff --git a/src/person/dto/v1.4/person-find-one-params.dto.ts b/src/person/dto/v1.4/person-find-one-params.dto.ts index fadb9af..841280c 100644 --- a/src/person/dto/v1.4/person-find-one-params.dto.ts +++ b/src/person/dto/v1.4/person-find-one-params.dto.ts @@ -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])