diff --git a/dictation_server/src/api/odms/openapi.json b/dictation_server/src/api/odms/openapi.json index c9c6b22..60460a3 100644 --- a/dictation_server/src/api/odms/openapi.json +++ b/dictation_server/src/api/odms/openapi.json @@ -172,6 +172,48 @@ "tags": ["users"] } }, + "/users/confirm/initpassword": { + "post": { + "operationId": "confirmUserAndInitPassword", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ConfirmRequest" } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ConfirmResponse" } + } + } + }, + "400": { + "description": "不正なトークン", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["users"] + } + }, "/users": { "get": { "operationId": "getUsers", diff --git a/dictation_server/src/features/users/users.controller.ts b/dictation_server/src/features/users/users.controller.ts index 0bbc043..b696aa1 100644 --- a/dictation_server/src/features/users/users.controller.ts +++ b/dictation_server/src/features/users/users.controller.ts @@ -43,6 +43,30 @@ export class UsersController { return {}; } + @ApiResponse({ + status: HttpStatus.OK, + type: ConfirmResponse, + description: '成功時のレスポンス', + }) + @ApiResponse({ + status: HttpStatus.BAD_REQUEST, + description: '不正なトークン', + type: ErrorResponse, + }) + @ApiResponse({ + status: HttpStatus.INTERNAL_SERVER_ERROR, + description: '想定外のサーバーエラー', + type: ErrorResponse, + }) + @ApiOperation({ operationId: 'confirmUserAndInitPassword' }) + @Post('confirm/initpassword') + async confirmUserAndInitPassword( + @Body() body: ConfirmRequest, + ): Promise { + console.log(body); + return {}; + } + @ApiResponse({ status: HttpStatus.OK, type: GetUsersResponse,