From 2472e0b29dea8890ec0d9a80cca5b23b6813704f Mon Sep 17 00:00:00 2001 From: mdwitr0 Date: Thu, 22 Feb 2024 19:34:52 +0100 Subject: [PATCH] hotfix: not valid contracts --- src/season/dto/v1/season.dto.ts | 4 ++-- src/season/schemas/season.schema.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/season/dto/v1/season.dto.ts b/src/season/dto/v1/season.dto.ts index 00803cf..a72c52a 100644 --- a/src/season/dto/v1/season.dto.ts +++ b/src/season/dto/v1/season.dto.ts @@ -1,4 +1,4 @@ -import { ApiPropertyOptional } from '@nestjs/swagger'; +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; export class EpisodeV1 { @ApiPropertyOptional() @@ -18,7 +18,7 @@ export class EpisodeV1 { } export class SeasonV1 { - @ApiPropertyOptional() + @ApiProperty() movieId: number; @ApiPropertyOptional() diff --git a/src/season/schemas/season.schema.ts b/src/season/schemas/season.schema.ts index f744b5a..f13349c 100644 --- a/src/season/schemas/season.schema.ts +++ b/src/season/schemas/season.schema.ts @@ -1,6 +1,6 @@ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; import { HydratedDocument } from 'mongoose'; -import { ApiPropertyOptional } from '@nestjs/swagger'; +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; import { ShortImage } from '../../movie/schemas/movie.schema'; export class Episode { @@ -44,7 +44,7 @@ export type SeasonDocument = HydratedDocument; toObject: { virtuals: true }, }) export class Season { - @ApiPropertyOptional() + @ApiProperty() @Prop({ index: true }) movieId: number;