From a740ec3c36a111d0878faa09109b0b567c90d47f Mon Sep 17 00:00:00 2001 From: "makabe.t" Date: Wed, 10 May 2023 07:25:59 +0000 Subject: [PATCH] =?UTF-8?q?Merged=20PR=2095:=20=EF=BC=88=E6=9C=80=E6=9C=80?= =?UTF-8?q?=E6=9C=80=E5=84=AA=E5=85=88=EF=BC=89fileSize=E3=82=92string?= =?UTF-8?q?=E3=81=8B=E3=82=89number=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 概要 [Task1728: (最最最優先)fileSizeをstringからnumberに修正](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/1728) - 外部連携APIのパラメータについてファイルサイズをnumberとするように修正しました。 - 外部連携API、音声ファイルアップロード完了APIに401認証エラーを追加しました。 ## レビューポイント - 修正内容は適切か ## UIの変更 無し ## 動作確認状況 - ローカルSwaggerで確認 --- dictation_server/src/api/odms/openapi.json | 17 ++++++++++++++--- .../src/features/files/files.controller.ts | 5 +++++ .../src/features/files/types/types.ts | 4 ++-- .../src/features/tasks/types/types.ts | 4 ++-- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/dictation_server/src/api/odms/openapi.json b/dictation_server/src/api/odms/openapi.json index 4326ad3..b08946e 100644 --- a/dictation_server/src/api/odms/openapi.json +++ b/dictation_server/src/api/odms/openapi.json @@ -453,6 +453,16 @@ } } }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, "500": { "description": "想定外のサーバーエラー", "content": { @@ -1578,7 +1588,8 @@ "description": "音声ファイルのアップロード日時(yyyy-mm-ddThh:mm:ss.sss)" }, "fileSize": { - "type": "string" + "type": "number", + "description": "音声ファイルのファイルサイズ(Byte)" }, "priority": { "type": "string", @@ -1729,8 +1740,8 @@ "description": "音声ファイルのアップロード日時(yyyy-mm-ddThh:mm:ss.sss)" }, "fileSize": { - "type": "string", - "description": "音声ファイルのファイルサイズ" + "type": "number", + "description": "音声ファイルのファイルサイズ(Byte)" }, "priority": { "type": "string", diff --git a/dictation_server/src/features/files/files.controller.ts b/dictation_server/src/features/files/files.controller.ts index 59e64bc..ba4873d 100644 --- a/dictation_server/src/features/files/files.controller.ts +++ b/dictation_server/src/features/files/files.controller.ts @@ -41,6 +41,11 @@ export class FilesController { description: '不正なパラメータ', type: ErrorResponse, }) + @ApiResponse({ + status: HttpStatus.UNAUTHORIZED, + description: '認証エラー', + type: ErrorResponse, + }) @ApiResponse({ status: HttpStatus.INTERNAL_SERVER_ERROR, description: '想定外のサーバーエラー', diff --git a/dictation_server/src/features/files/types/types.ts b/dictation_server/src/features/files/types/types.ts index aad7373..5136d3b 100644 --- a/dictation_server/src/features/files/types/types.ts +++ b/dictation_server/src/features/files/types/types.ts @@ -62,8 +62,8 @@ export class AudioUploadFinishedRequest { description: '音声ファイルのアップロード日時(yyyy-mm-ddThh:mm:ss.sss)', }) uploadedDate: string; - @ApiProperty() - fileSize: string; + @ApiProperty({ description: '音声ファイルのファイルサイズ(Byte)' }) + fileSize: number; @ApiProperty({ description: '優先度 "00":Normal / "01":High' }) priority: string; @ApiProperty({ description: '録音形式: DSS/DS2(SP)/DS2(QP)' }) diff --git a/dictation_server/src/features/tasks/types/types.ts b/dictation_server/src/features/tasks/types/types.ts index 3f87b39..4d51d2c 100644 --- a/dictation_server/src/features/tasks/types/types.ts +++ b/dictation_server/src/features/tasks/types/types.ts @@ -69,8 +69,8 @@ export class Task { description: '音声ファイルのアップロード日時(yyyy-mm-ddThh:mm:ss.sss)', }) audioUploadedDate: string; - @ApiProperty({ description: '音声ファイルのファイルサイズ' }) - fileSize: string; + @ApiProperty({ description: '音声ファイルのファイルサイズ(Byte)' }) + fileSize: number; @ApiProperty({ description: '音声ファイルの優先度 "00":Normal / "01":High' }) priority: string; @ApiProperty({ description: '録音形式: DSS/DS2(SP)/DS2(QP)' })