diff --git a/openapi.yaml b/openapi.yaml index 7654c84..8b99362 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -68,6 +68,8 @@ paths: $ref: '#/components/responses/BadRequest' '404': $ref: '#/components/responses/NotFound' + '500': + $ref: '#/components/responses/InternalServerError' /auth/codes/{authCodeId}/newUser: post: @@ -95,6 +97,8 @@ paths: $ref: '#/components/responses/BadRequest' '404': $ref: '#/components/responses/NotFound' + '500': + $ref: '#/components/responses/InternalServerError' /users: @@ -127,7 +131,9 @@ paths: '400': $ref: '#/components/responses/BadRequest' '401': - $ref: '#/components/responses/Unauthorized' + $ref: '#/components/responses/RegisterTokenExpired' + '500': + $ref: '#/components/responses/InternalServerError' /auth/token/refresh: post: @@ -149,8 +155,12 @@ paths: application/json: schema: $ref: '#/components/schemas/RefreshTokenResponse' + '400': + $ref: '#/components/responses/InvalidRefreshToken' '401': - $ref: '#/components/responses/Unauthorized' + $ref: '#/components/responses/RefreshTokenExpired' + '500': + $ref: '#/components/responses/InternalServerError' /locations: get: @@ -166,6 +176,8 @@ paths: application/json: schema: $ref: '#/components/schemas/GetLocationsResponse' + '500': + $ref: '#/components/responses/InternalServerError' /companies: get: @@ -185,6 +197,8 @@ paths: application/json: schema: $ref: '#/components/schemas/SearchCompaniesResponse' + '500': + $ref: '#/components/responses/InternalServerError' /companies/{companyId}: get: @@ -204,6 +218,8 @@ paths: $ref: '#/components/schemas/GetCompanyDetailsResponse' '404': $ref: '#/components/responses/NotFound' + '500': + $ref: '#/components/responses/InternalServerError' /jobs: get: @@ -223,6 +239,8 @@ paths: application/json: schema: $ref: '#/components/schemas/SearchJobsResponse' + '500': + $ref: '#/components/responses/InternalServerError' components: securitySchemes: @@ -304,13 +322,27 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - - Unauthorized: - description: 인증 실패 + examples: + invalidRequest: + value: + time: "2024-05-01T00:00:00Z" + type: "COMMON" + code: "1001" + message: "잘못된 요청입니다." + + RegisterTokenExpired: + description: 회원 가입 토큰 만료 content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + examples: + tokenExpired: + value: + time: "2024-05-01T00:00:00Z" + type: "AUTH" + code: "1003" + message: "회원 가입 토큰이 만료되었습니다." NotFound: description: 리소스를 찾을 수 없음 @@ -318,37 +350,80 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + examples: + notFound: + value: + time: "2024-05-01T00:00:00Z" + type: "COMMON" + code: "1002" + message: "리소스를 찾을 수 없습니다." + + InternalServerError: + description: 서버 오류 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + serverError: + value: + time: "2024-05-01T00:00:00Z" + type: "COMMON" + code: "1003" + message: "서버 오류가 발생했습니다." + + RefreshTokenExpired: + description: 리프레시 토큰 만료 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + tokenExpired: + value: + time: "2024-05-01T00:00:00Z" + type: "AUTH" + code: "1008" + message: "리프레시 토큰이 만료되었습니다." + + InvalidRefreshToken: + description: 유효하지 않은 리프레시 토큰 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + invalidToken: + value: + time: "2024-05-01T00:00:00Z" + type: "AUTH" + code: "1009" + message: "유효하지 않은 리프레시 토큰입니다." schemas: ErrorResponse: type: object properties: - timestamp: - type: integer - format: int64 - description: 에러 발생 시각 (Unix timestamp) - status: - type: integer - description: HTTP 상태 코드 - error: + time: + type: string + format: date-time + description: 에러 발생 시각 (ISO 8601) + example: "2024-05-01T00:00:00Z" + type: type: string description: 에러 유형 - example: USER - exception: + example: COMMON + code: type: string - description: 예외 클래스 이름 + description: 에러 코드 + example: "1001" message: type: string description: 상세 에러 메시지 - path: - type: string - description: 에러가 발생한 요청 경로 required: - - timestamp - - status - - error - - message - - path + - time + - type + - code SendAuthCodeRequest: type: object