From 1e42f9baca248ec6ef056ddbf537b31c759ee0ec Mon Sep 17 00:00:00 2001 From: Gwanho Kim <83526533+khkim6040@users.noreply.github.com> Date: Thu, 1 Aug 2024 20:20:22 +0900 Subject: [PATCH] Add swagger plugin (#120) --- nest-cli.json | 12 +++++++++++- src/popo/reservation/place/reserve.place.dto.ts | 11 ----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/nest-cli.json b/nest-cli.json index 56167b3..20c5ac4 100644 --- a/nest-cli.json +++ b/nest-cli.json @@ -1,4 +1,14 @@ { "collection": "@nestjs/schematics", - "sourceRoot": "src" + "sourceRoot": "src", + "compilerOptions": { + "plugins": [ + { + "name": "@nestjs/swagger", + "options": { + "classValidatorShim": true + } + } + ] + } } diff --git a/src/popo/reservation/place/reserve.place.dto.ts b/src/popo/reservation/place/reserve.place.dto.ts index c8544cd..ccad8dc 100644 --- a/src/popo/reservation/place/reserve.place.dto.ts +++ b/src/popo/reservation/place/reserve.place.dto.ts @@ -1,32 +1,21 @@ -import { ApiProperty } from '@nestjs/swagger'; - export class CreateReservePlaceDto { - @ApiProperty() readonly place_id: string; // uuid of place - @ApiProperty() readonly booker_id?: string; // uuid of booker - @ApiProperty() readonly phone: string; - @ApiProperty() readonly title: string; - @ApiProperty() readonly description: string; - @ApiProperty() readonly date: string; // YYYYMMDD - @ApiProperty() readonly start_time: string; // hhmm - @ApiProperty() readonly end_time: string; // hhmm } export class AcceptPlaceReservationListDto { - @ApiProperty() readonly uuid_list: string[]; }