diff --git a/dictation_server/src/api/odms/openapi.json b/dictation_server/src/api/odms/openapi.json index ec1db17..17762a1 100644 --- a/dictation_server/src/api/odms/openapi.json +++ b/dictation_server/src/api/odms/openapi.json @@ -6,11 +6,7 @@ "operationId": "checkHealth", "summary": "", "parameters": [], - "responses": { - "200": { - "description": "" - } - } + "responses": { "200": { "description": "" } } } }, "/auth/token": { @@ -23,9 +19,7 @@ "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/TokenRequest" - } + "schema": { "$ref": "#/components/schemas/TokenRequest" } } } }, @@ -34,9 +28,7 @@ "description": "成功時のレスポンス", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/TokenResponse" - } + "schema": { "$ref": "#/components/schemas/TokenResponse" } } } }, @@ -44,9 +36,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -54,9 +44,7 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } @@ -75,9 +63,7 @@ "description": "成功時のレスポンス", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/AccessTokenResponse" - } + "schema": { "$ref": "#/components/schemas/AccessTokenResponse" } } } }, @@ -85,9 +71,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -95,19 +79,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["auth"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/accounts": { @@ -119,9 +97,7 @@ "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAccountRequest" - } + "schema": { "$ref": "#/components/schemas/CreateAccountRequest" } } } }, @@ -140,9 +116,7 @@ "description": "登録済みユーザーからの登録など", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -150,9 +124,7 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } @@ -191,9 +163,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -201,19 +171,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["accounts"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/accounts/me": { @@ -237,9 +201,7 @@ "description": "該当アカウントがDBに存在しない場合", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -247,9 +209,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -257,19 +217,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["accounts"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/accounts/typists": { @@ -283,9 +237,7 @@ "description": "成功時のレスポンス", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/GetTypistsResponse" - } + "schema": { "$ref": "#/components/schemas/GetTypistsResponse" } } } }, @@ -293,9 +245,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -303,19 +253,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["accounts"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/accounts/typist-groups": { @@ -339,9 +283,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -349,19 +291,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["accounts"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/users/confirm": { @@ -373,9 +309,7 @@ "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ConfirmRequest" - } + "schema": { "$ref": "#/components/schemas/ConfirmRequest" } } } }, @@ -384,9 +318,7 @@ "description": "成功時のレスポンス", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ConfirmResponse" - } + "schema": { "$ref": "#/components/schemas/ConfirmResponse" } } } }, @@ -394,9 +326,7 @@ "description": "不正なトークン", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -404,9 +334,7 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } @@ -423,9 +351,7 @@ "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ConfirmRequest" - } + "schema": { "$ref": "#/components/schemas/ConfirmRequest" } } } }, @@ -434,9 +360,7 @@ "description": "成功時のレスポンス", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ConfirmResponse" - } + "schema": { "$ref": "#/components/schemas/ConfirmResponse" } } } }, @@ -444,9 +368,7 @@ "description": "不正なトークン", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -454,9 +376,7 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } @@ -474,9 +394,7 @@ "description": "成功時のレスポンス", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/GetUsersResponse" - } + "schema": { "$ref": "#/components/schemas/GetUsersResponse" } } } }, @@ -484,9 +402,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -494,19 +410,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["users"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/users/signup": { @@ -518,9 +428,7 @@ "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/SignupRequest" - } + "schema": { "$ref": "#/components/schemas/SignupRequest" } } } }, @@ -529,9 +437,7 @@ "description": "成功時のレスポンス", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/SignupResponse" - } + "schema": { "$ref": "#/components/schemas/SignupResponse" } } } }, @@ -539,9 +445,7 @@ "description": "登録済みメールによる再登録、AuthorIDの重複など", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -549,9 +453,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -559,19 +461,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["users"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/users/relations": { @@ -595,9 +491,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -605,19 +499,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["users"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/users/sort-criteria": { @@ -651,9 +539,7 @@ "description": "不正なパラメータ", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -661,9 +547,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -671,19 +555,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["users"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] }, "get": { "operationId": "getSortCcriteria", @@ -705,9 +583,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -715,19 +591,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["users"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/files/audio/upload-finished": { @@ -735,16 +605,7 @@ "operationId": "uploadFinished", "summary": "", "description": "アップロードが完了した音声ファイルの情報を登録し、文字起こしタスクを生成します", - "parameters": [ - { - "name": "authorization", - "required": true, - "in": "header", - "schema": { - "type": "string" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { @@ -770,9 +631,7 @@ "description": "不正なパラメータ", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -780,9 +639,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -790,19 +647,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["files"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/files/audio/upload-location": { @@ -810,16 +661,7 @@ "operationId": "uploadLocation", "summary": "", "description": "ログイン中ユーザー用のBlob Storage上の音声ファイルのアップロード先アクセスURLを取得します", - "parameters": [ - { - "name": "authorization", - "required": true, - "in": "header", - "schema": { - "type": "string" - } - } - ], + "parameters": [], "responses": { "200": { "description": "成功時のレスポンス", @@ -835,9 +677,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -845,19 +685,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["files"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/files/audio/download-location": { @@ -871,9 +705,7 @@ "required": true, "in": "query", "description": "ODMSCloud上で管理する音声ファイルのID", - "schema": { - "type": "number" - } + "schema": { "type": "number" } } ], "responses": { @@ -891,9 +723,7 @@ "description": "不正なパラメータ", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -901,9 +731,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -911,19 +739,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["files"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/files/template/download-location": { @@ -937,9 +759,7 @@ "required": true, "in": "query", "description": "文字起こし対象の音声ファイルID", - "schema": { - "type": "number" - } + "schema": { "type": "number" } } ], "responses": { @@ -957,9 +777,7 @@ "description": "不正なパラメータ", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -967,9 +785,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -977,19 +793,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["files"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/tasks": { @@ -1003,20 +813,14 @@ "required": false, "in": "query", "description": "タスクの取得件数(指定しない場合はデフォルト値)", - "schema": { - "default": 200, - "type": "number" - } + "schema": { "default": 200, "type": "number" } }, { "name": "offset", "required": false, "in": "query", "description": "オフセット(何件目から取得するか 設定しない場合はデフォルト値)", - "schema": { - "default": 0, - "type": "number" - } + "schema": { "default": 0, "type": "number" } }, { "name": "status", @@ -1024,27 +828,21 @@ "in": "query", "description": "取得対象とするタスクのステータス。カンマ(,)区切りで複数指定可能。設定されない場合はすべてのステータスを取得対象とする。許容するステータスの値は次の通り: Uploaded / Pending / InProgress / Finished / Backup", "example": "Uploaded,Pending,InProgress", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "direction", "required": false, "in": "query", "description": "ASC/DESC", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "paramName", "required": false, "in": "query", "description": "JOB_NUMBER/STATUS/ENCRYPTION/AUTHOR_ID/WORK_TYPE/FILE_NAME/FILE_LENGTH/FILE_SIZE/RECORDING_STARTED_DATE/RECORDING_FINISHED_DATE/UPLOAD_DATE/TRANSCRIPTION_STARTED_DATE/TRANSCRIPTION_FINISHED_DATE", - "schema": { - "type": "string" - } + "schema": { "type": "string" } } ], "responses": { @@ -1052,9 +850,7 @@ "description": "成功時のレスポンス", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/TasksResponse" - } + "schema": { "$ref": "#/components/schemas/TasksResponse" } } } }, @@ -1062,9 +858,7 @@ "description": "不正なパラメータ", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1072,9 +866,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1082,19 +874,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["tasks"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/tasks/next": { @@ -1108,9 +894,7 @@ "required": true, "in": "query", "description": "文字起こし完了したタスクの音声ファイルID", - "schema": { - "type": "number" - } + "schema": { "type": "number" } } ], "responses": { @@ -1118,9 +902,7 @@ "description": "成功時のレスポンス", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/AudioNextResponse" - } + "schema": { "$ref": "#/components/schemas/AudioNextResponse" } } } }, @@ -1128,9 +910,7 @@ "description": "不正なパラメータ", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1138,9 +918,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1148,19 +926,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["tasks"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/tasks/{audioFileId}/checkout": { @@ -1174,9 +946,7 @@ "required": true, "in": "path", "description": "ODMS Cloud上の音声ファイルID", - "schema": { - "type": "number" - } + "schema": { "type": "number" } } ], "responses": { @@ -1194,9 +964,7 @@ "description": "不正なパラメータ", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1204,9 +972,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1214,9 +980,7 @@ "description": "指定したIDの音声ファイルが存在しない場合", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1224,19 +988,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["tasks"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/tasks/{audioFileId}/checkin": { @@ -1250,9 +1008,7 @@ "required": true, "in": "path", "description": "ODMS Cloud上の音声ファイルID", - "schema": { - "type": "number" - } + "schema": { "type": "number" } } ], "responses": { @@ -1270,9 +1026,7 @@ "description": "不正なパラメータ", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1280,9 +1034,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1290,9 +1042,7 @@ "description": "指定したIDの音声ファイルが存在しない場合", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1300,19 +1050,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["tasks"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/tasks/{audioFileId}/cancel": { @@ -1326,9 +1070,7 @@ "required": true, "in": "path", "description": "ODMS Cloud上の音声ファイルID", - "schema": { - "type": "number" - } + "schema": { "type": "number" } } ], "responses": { @@ -1346,9 +1088,7 @@ "description": "不正なパラメータ", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1356,9 +1096,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1366,9 +1104,7 @@ "description": "指定したIDの音声ファイルが存在しない場合", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1376,19 +1112,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["tasks"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/tasks/{audioFileId}/suspend": { @@ -1402,9 +1132,7 @@ "required": true, "in": "path", "description": "ODMS Cloud上の音声ファイルID", - "schema": { - "type": "number" - } + "schema": { "type": "number" } } ], "responses": { @@ -1422,9 +1150,7 @@ "description": "不正なパラメータ", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1432,9 +1158,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1442,9 +1166,7 @@ "description": "指定したIDの音声ファイルが存在しない場合", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1452,19 +1174,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["tasks"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/tasks/{audioFileId}/send-back": { @@ -1478,9 +1194,7 @@ "required": true, "in": "path", "description": "ODMS Cloud上の音声ファイルID", - "schema": { - "type": "number" - } + "schema": { "type": "number" } } ], "responses": { @@ -1498,9 +1212,7 @@ "description": "不正なパラメータ", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1508,9 +1220,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1518,9 +1228,7 @@ "description": "指定したIDの音声ファイルが存在しない場合", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1528,19 +1236,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["tasks"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/tasks/{audioFileId}/backup": { @@ -1554,9 +1256,7 @@ "required": true, "in": "path", "description": "ODMS Cloud上の音声ファイルID", - "schema": { - "type": "number" - } + "schema": { "type": "number" } } ], "responses": { @@ -1574,9 +1274,7 @@ "description": "不正なパラメータ", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1584,9 +1282,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1594,9 +1290,7 @@ "description": "指定したIDの音声ファイルが存在しない場合", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1604,19 +1298,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["tasks"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/tasks/{audioFileId}/checkout-permission": { @@ -1629,9 +1317,7 @@ "name": "audioFileId", "required": true, "in": "path", - "schema": { - "type": "number" - } + "schema": { "type": "number" } } ], "requestBody": { @@ -1659,9 +1345,7 @@ "description": "不正なパラメータ(タスクのステータス不正、指定ユーザー不正など)", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1669,9 +1353,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1679,9 +1361,7 @@ "description": "指定したIDの音声ファイルが存在しない", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1689,19 +1369,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["tasks"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/licenses/orders": { @@ -1713,9 +1387,7 @@ "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOrdersRequest" - } + "schema": { "$ref": "#/components/schemas/CreateOrdersRequest" } } } }, @@ -1734,9 +1406,7 @@ "description": "同一PONumberの注文がすでに存在する場合など", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1744,9 +1414,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1754,19 +1422,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["licenses"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } }, "/notification/register": { @@ -1778,9 +1440,7 @@ "required": true, "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisterRequest" - } + "schema": { "$ref": "#/components/schemas/RegisterRequest" } } } }, @@ -1789,9 +1449,7 @@ "description": "成功時のレスポンス", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisterResponse" - } + "schema": { "$ref": "#/components/schemas/RegisterResponse" } } } }, @@ -1799,9 +1457,7 @@ "description": "不正なパラメータ", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1809,9 +1465,7 @@ "description": "認証エラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, @@ -1819,19 +1473,13 @@ "description": "想定外のサーバーエラー", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": ["notification"], - "security": [ - { - "bearer": [] - } - ] + "security": [{ "bearer": [] }] } } }, @@ -1845,19 +1493,13 @@ "servers": [], "components": { "securitySchemes": { - "bearer": { - "scheme": "bearer", - "bearerFormat": "JWT", - "type": "http" - } + "bearer": { "scheme": "bearer", "bearerFormat": "JWT", "type": "http" } }, "schemas": { "TokenRequest": { "type": "object", "properties": { - "idToken": { - "type": "string" - }, + "idToken": { "type": "string" }, "type": { "type": "string", "description": "web or mobile or desktop" @@ -1868,69 +1510,43 @@ "TokenResponse": { "type": "object", "properties": { - "refreshToken": { - "type": "string" - }, - "accessToken": { - "type": "string" - } + "refreshToken": { "type": "string" }, + "accessToken": { "type": "string" } }, "required": ["refreshToken", "accessToken"] }, "ErrorResponse": { "type": "object", "properties": { - "message": { - "type": "string" - }, - "code": { - "type": "string" - } + "message": { "type": "string" }, + "code": { "type": "string" } }, "required": ["message", "code"] }, "AccessTokenResponse": { "type": "object", - "properties": { - "accessToken": { - "type": "string" - } - }, + "properties": { "accessToken": { "type": "string" } }, "required": ["accessToken"] }, "CreateAccountRequest": { "type": "object", "properties": { - "companyName": { - "type": "string" - }, + "companyName": { "type": "string" }, "country": { "type": "string", "description": "国名(ISO 3166-1 alpha-2)", "minLength": 2, "maxLength": 2 }, - "dealerAccountId": { - "type": "number", - "nullable": true - }, - "adminName": { - "type": "string" - }, - "adminMail": { - "type": "string" - }, - "adminPassword": { - "type": "string" - }, + "dealerAccountId": { "type": "number", "nullable": true }, + "adminName": { "type": "string" }, + "adminMail": { "type": "string" }, + "adminPassword": { "type": "string" }, "acceptedTermsVersion": { "type": "string", "description": "同意済み利用規約のバージョン" }, - "token": { - "type": "string", - "description": "reCAPTCHA Token" - } + "token": { "type": "string", "description": "reCAPTCHA Token" } }, "required": [ "companyName", @@ -1943,55 +1559,26 @@ "token" ] }, - "CreateAccountResponse": { - "type": "object", - "properties": {} - }, + "CreateAccountResponse": { "type": "object", "properties": {} }, "GetLicenseSummaryRequest": { "type": "object", - "properties": { - "accountId": { - "type": "number" - } - }, + "properties": { "accountId": { "type": "number" } }, "required": ["accountId"] }, "GetLicenseSummaryResponse": { "type": "object", "properties": { - "totalLicense": { - "type": "number" - }, - "allocatedLicense": { - "type": "number" - }, - "reusableLicense": { - "type": "number" - }, - "freeLicense": { - "type": "number" - }, - "expiringWithin14daysLicense": { - "type": "number" - }, - "issueRequesting": { - "type": "number" - }, - "numberOfRequesting": { - "type": "number" - }, - "shortage": { - "type": "number" - }, - "storageSize": { - "type": "number" - }, - "usedSize": { - "type": "number" - }, - "isAccountLock": { - "type": "boolean" - } + "totalLicense": { "type": "number" }, + "allocatedLicense": { "type": "number" }, + "reusableLicense": { "type": "number" }, + "freeLicense": { "type": "number" }, + "expiringWithin14daysLicense": { "type": "number" }, + "issueRequesting": { "type": "number" }, + "numberOfRequesting": { "type": "number" }, + "shortage": { "type": "number" }, + "storageSize": { "type": "number" }, + "usedSize": { "type": "number" }, + "isAccountLock": { "type": "boolean" } }, "required": [ "totalLicense", @@ -2009,33 +1596,19 @@ }, "Account": { "type": "object", - "properties": { - "accountId": { - "type": "number" - } - }, + "properties": { "accountId": { "type": "number" } }, "required": ["accountId"] }, "GetMyAccountResponse": { "type": "object", - "properties": { - "account": { - "$ref": "#/components/schemas/Account" - } - }, + "properties": { "account": { "$ref": "#/components/schemas/Account" } }, "required": ["account"] }, "Typist": { "type": "object", "properties": { - "id": { - "type": "number", - "description": "TypistのユーザーID" - }, - "name": { - "type": "string", - "description": "Typistのユーザー名" - } + "id": { "type": "number", "description": "TypistのユーザーID" }, + "name": { "type": "string", "description": "Typistのユーザー名" } }, "required": ["id", "name"] }, @@ -2044,9 +1617,7 @@ "properties": { "typists": { "type": "array", - "items": { - "$ref": "#/components/schemas/Typist" - } + "items": { "$ref": "#/components/schemas/Typist" } } }, "required": ["typists"] @@ -2054,14 +1625,8 @@ "TypistGroup": { "type": "object", "properties": { - "id": { - "type": "number", - "description": "TypistGroupのID" - }, - "name": { - "type": "string", - "description": "TypistGroup名" - } + "id": { "type": "number", "description": "TypistGroupのID" }, + "name": { "type": "string", "description": "TypistGroup名" } }, "required": ["id", "name"] }, @@ -2070,59 +1635,29 @@ "properties": { "typistGroups": { "type": "array", - "items": { - "$ref": "#/components/schemas/TypistGroup" - } + "items": { "$ref": "#/components/schemas/TypistGroup" } } }, "required": ["typistGroups"] }, "ConfirmRequest": { "type": "object", - "properties": { - "token": { - "type": "string" - } - }, + "properties": { "token": { "type": "string" } }, "required": ["token"] }, - "ConfirmResponse": { - "type": "object", - "properties": {} - }, + "ConfirmResponse": { "type": "object", "properties": {} }, "User": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "role": { - "type": "string", - "description": "none/author/typist" - }, - "authorId": { - "type": "string", - "nullable": true - }, - "typistGroupName": { - "type": "string", - "nullable": true - }, - "email": { - "type": "string" - }, - "emailVerified": { - "type": "boolean" - }, - "autoRenew": { - "type": "boolean" - }, - "licenseAlert": { - "type": "boolean" - }, - "notification": { - "type": "boolean" - } + "name": { "type": "string" }, + "role": { "type": "string", "description": "none/author/typist" }, + "authorId": { "type": "string", "nullable": true }, + "typistGroupName": { "type": "string", "nullable": true }, + "email": { "type": "string" }, + "emailVerified": { "type": "boolean" }, + "autoRenew": { "type": "boolean" }, + "licenseAlert": { "type": "boolean" }, + "notification": { "type": "boolean" } }, "required": [ "name", @@ -2141,9 +1676,7 @@ "properties": { "users": { "type": "array", - "items": { - "$ref": "#/components/schemas/User" - } + "items": { "$ref": "#/components/schemas/User" } } }, "required": ["users"] @@ -2151,31 +1684,14 @@ "SignupRequest": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "role": { - "type": "string", - "description": "none/author/typist" - }, - "authorId": { - "type": "string" - }, - "typistGroupId": { - "type": "number" - }, - "email": { - "type": "string" - }, - "autoRenew": { - "type": "boolean" - }, - "licenseAlert": { - "type": "boolean" - }, - "notification": { - "type": "boolean" - } + "name": { "type": "string" }, + "role": { "type": "string", "description": "none/author/typist" }, + "authorId": { "type": "string" }, + "typistGroupId": { "type": "number" }, + "email": { "type": "string" }, + "autoRenew": { "type": "boolean" }, + "licenseAlert": { "type": "boolean" }, + "notification": { "type": "boolean" } }, "required": [ "name", @@ -2186,10 +1702,7 @@ "notification" ] }, - "SignupResponse": { - "type": "object", - "properties": {} - }, + "SignupResponse": { "type": "object", "properties": {} }, "OptionItem": { "type": "object", "properties": { @@ -2215,16 +1728,12 @@ "OptionItemList": { "type": "object", "properties": { - "workTypeId": { - "type": "string" - }, + "workTypeId": { "type": "string" }, "optionItemList": { "maxItems": 10, "description": "1WorkTypeIDにつき、10個まで登録可能", "type": "array", - "items": { - "$ref": "#/components/schemas/OptionItem" - } + "items": { "$ref": "#/components/schemas/OptionItem" } } }, "required": ["workTypeId", "optionItemList"] @@ -2239,17 +1748,13 @@ "authorIdList": { "description": "属しているアカウントのAuthorID List(全て)", "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } }, "workTypeList": { "maxItems": 20, "description": "アカウントに設定されているWorktypeIDのリスト(最大20個)", "type": "array", - "items": { - "$ref": "#/components/schemas/OptionItemList" - } + "items": { "$ref": "#/components/schemas/OptionItemList" } }, "isEncrypted": { "type": "boolean", @@ -2287,10 +1792,7 @@ "PostSortCriteriaRequest": { "type": "object", "properties": { - "direction": { - "type": "string", - "description": "ASC/DESC" - }, + "direction": { "type": "string", "description": "ASC/DESC" }, "paramName": { "type": "string", "description": "JOB_NUMBER/STATUS/ENCRYPTION/AUTHOR_ID/WORK_TYPE/FILE_NAME/FILE_LENGTH/FILE_SIZE/RECORDING_STARTED_DATE/RECORDING_FINISHED_DATE/UPLOAD_DATE/TRANSCRIPTION_STARTED_DATE/TRANSCRIPTION_FINISHED_DATE" @@ -2298,17 +1800,11 @@ }, "required": ["direction", "paramName"] }, - "PostSortCriteriaResponse": { - "type": "object", - "properties": {} - }, + "PostSortCriteriaResponse": { "type": "object", "properties": {} }, "GetSortCriteriaResponse": { "type": "object", "properties": { - "direction": { - "type": "string", - "description": "ASC/DESC" - }, + "direction": { "type": "string", "description": "ASC/DESC" }, "paramName": { "type": "string", "description": "JOB_NUMBER/STATUS/ENCRYPTION/AUTHOR_ID/WORK_TYPE/FILE_NAME/FILE_LENGTH/FILE_SIZE/RECORDING_STARTED_DATE/RECORDING_FINISHED_DATE/UPLOAD_DATE/TRANSCRIPTION_STARTED_DATE/TRANSCRIPTION_FINISHED_DATE" @@ -2343,10 +1839,7 @@ "type": "string", "description": "自分自身(ログイン認証)したAuthorID" }, - "fileName": { - "type": "string", - "description": "音声ファイル名" - }, + "fileName": { "type": "string", "description": "音声ファイル名" }, "duration": { "type": "string", "description": "音声ファイルの録音時間(ミリ秒の整数値)" @@ -2375,24 +1868,16 @@ "type": "string", "description": "録音形式: DSS/DS2(SP)/DS2(QP)" }, - "comment": { - "type": "string" - }, - "workType": { - "type": "string" - }, + "comment": { "type": "string" }, + "workType": { "type": "string" }, "optionItemList": { "maxItems": 10, "minItems": 10, "description": "音声ファイルに紐づくOption Itemの一覧(10個固定)", "type": "array", - "items": { - "$ref": "#/components/schemas/AudioOptionItem" - } + "items": { "$ref": "#/components/schemas/AudioOptionItem" } }, - "isEncrypted": { - "type": "boolean" - } + "isEncrypted": { "type": "boolean" } }, "required": [ "url", @@ -2414,10 +1899,7 @@ "AudioUploadFinishedResponse": { "type": "object", "properties": { - "jobNumber": { - "type": "string", - "description": "8桁固定の数字" - } + "jobNumber": { "type": "string", "description": "8桁固定の数字" } }, "required": ["jobNumber"] }, @@ -2443,11 +1925,7 @@ }, "TemplateDownloadLocationResponse": { "type": "object", - "properties": { - "url": { - "type": "string" - } - }, + "properties": { "url": { "type": "string" } }, "required": ["url"] }, "Assignee": { @@ -2475,30 +1953,20 @@ "type": "number", "description": "ODMS Cloud上の音声ファイルID" }, - "authorId": { - "type": "string", - "description": "AuthorID" - }, - "workType": { - "type": "string" - }, + "authorId": { "type": "string", "description": "AuthorID" }, + "workType": { "type": "string" }, "optionItemList": { "maxItems": 10, "minItems": 10, "description": "音声ファイルに紐づくOption Itemの一覧(10個固定)", "type": "array", - "items": { - "$ref": "#/components/schemas/AudioOptionItem" - } + "items": { "$ref": "#/components/schemas/AudioOptionItem" } }, "url": { "type": "string", "description": "音声ファイルのBlob Storage上での保存場所(ファイル名含む)のURL" }, - "fileName": { - "type": "string", - "description": "音声ファイル名" - }, + "fileName": { "type": "string", "description": "音声ファイル名" }, "audioDuration": { "type": "string", "description": "音声ファイルの録音時間(ミリ秒の整数値)" @@ -2527,31 +1995,17 @@ "type": "string", "description": "録音形式: DSS/DS2(SP)/DS2(QP)" }, - "comment": { - "type": "string", - "description": "コメント" - }, - "isEncrypted": { - "type": "boolean" - }, - "jobNumber": { - "type": "string", - "description": "JOBナンバー" - }, + "comment": { "type": "string", "description": "コメント" }, + "isEncrypted": { "type": "boolean" }, + "jobNumber": { "type": "string", "description": "JOBナンバー" }, "typist": { "description": "割り当てられたユーザー", - "allOf": [ - { - "$ref": "#/components/schemas/Typist" - } - ] + "allOf": [{ "$ref": "#/components/schemas/Typist" }] }, "assignees": { "description": "文字起こしに着手できる(チェックアウト可能な)、タスクにアサインされているグループ/個人の一覧", "type": "array", - "items": { - "$ref": "#/components/schemas/Assignee" - } + "items": { "$ref": "#/components/schemas/Assignee" } }, "status": { "type": "string", @@ -2598,16 +2052,11 @@ "type": "number", "description": "オフセット(何件目から取得するか 設定しない場合はデフォルト値)" }, - "total": { - "type": "number", - "description": "タスクの総件数" - }, + "total": { "type": "number", "description": "タスクの総件数" }, "tasks": { "description": "音声ファイル/タスク一覧", "type": "array", - "items": { - "$ref": "#/components/schemas/Task" - } + "items": { "$ref": "#/components/schemas/Task" } } }, "required": ["limit", "offset", "total", "tasks"] @@ -2621,50 +2070,32 @@ } } }, - "ChangeStatusResponse": { - "type": "object", - "properties": {} - }, + "ChangeStatusResponse": { "type": "object", "properties": {} }, "PostCheckoutPermissionRequest": { "type": "object", "properties": { "assignees": { "description": "文字起こしに着手可能(チェックアウト可能)にしたい、グループ個人の一覧", "type": "array", - "items": { - "$ref": "#/components/schemas/Assignee" - } + "items": { "$ref": "#/components/schemas/Assignee" } } }, "required": ["assignees"] }, - "PostCheckoutPermissionResponse": { - "type": "object", - "properties": {} - }, + "PostCheckoutPermissionResponse": { "type": "object", "properties": {} }, "CreateOrdersRequest": { "type": "object", "properties": { - "poNumber": { - "type": "string" - }, - "orderCount": { - "type": "number" - } + "poNumber": { "type": "string" }, + "orderCount": { "type": "number" } }, "required": ["poNumber", "orderCount"] }, - "CreateOrdersResponse": { - "type": "object", - "properties": {} - }, + "CreateOrdersResponse": { "type": "object", "properties": {} }, "RegisterRequest": { "type": "object", "properties": { - "pns": { - "type": "string", - "description": "wns or apns" - }, + "pns": { "type": "string", "description": "wns or apns" }, "handler": { "type": "string", "description": "wnsのチャネルURI or apnsのデバイストークン" @@ -2672,10 +2103,7 @@ }, "required": ["pns", "handler"] }, - "RegisterResponse": { - "type": "object", - "properties": {} - } + "RegisterResponse": { "type": "object", "properties": {} } } } } diff --git a/dictation_server/src/features/files/files.controller.ts b/dictation_server/src/features/files/files.controller.ts index 6ebe4b9..cabea34 100644 --- a/dictation_server/src/features/files/files.controller.ts +++ b/dictation_server/src/features/files/files.controller.ts @@ -6,6 +6,7 @@ import { HttpStatus, Post, Query, + Req, UseGuards, } from '@nestjs/common'; import { @@ -31,6 +32,8 @@ import { import { AuthGuard } from '../../common/guards/auth/authguards'; import { RoleGuard } from '../../common/guards/role/roleguards'; import { USER_ROLES } from '../../constants'; +import { retrieveAuthorizationToken } from '../../common/http/helper'; +import { Request } from 'express'; @ApiTags('files') @Controller('files') @@ -67,13 +70,11 @@ export class FilesController { @UseGuards(RoleGuard.requireds({ roles: [USER_ROLES.AUTHOR] })) @Post('audio/upload-finished') async uploadFinished( - @Headers('authorization') authorization: string, + @Req() req: Request, @Body() body: AudioUploadFinishedRequest, ): Promise { - const accessToken = jwt.decode( - authorization.substring('Bearer '.length, authorization.length), - { json: true }, - ) as AccessToken; + const token = retrieveAuthorizationToken(req); + const accessToken = jwt.decode(token, { json: true }) as AccessToken; const { url, @@ -138,16 +139,13 @@ export class FilesController { @UseGuards(AuthGuard) @UseGuards(RoleGuard.requireds({ roles: [USER_ROLES.AUTHOR] })) async uploadLocation( - @Headers('authorization') authorization: string, + @Req() req: Request, // クエリパラメータ AudioUploadLocationRequest は空であるため内部で使用しない。 // 使用しないことを宣言するために先頭にプレフィックス_(アンダースコア)をつけている // eslint-disable-next-line @typescript-eslint/no-unused-vars @Query() _query: AudioUploadLocationRequest, ): Promise { - const token = authorization.substring( - 'Bearer '.length, - authorization.length, - ); + const token = retrieveAuthorizationToken(req); const accessToken = jwt.decode(token, { json: true }) as AccessToken; const url = await this.filesService.publishUploadSas(accessToken); return { url };