From 6ec0fdb5fecb6b3527ed5a2acb87950e095b6862 Mon Sep 17 00:00:00 2001 From: yudonggeun Date: Wed, 5 Jun 2024 14:24:31 +0900 Subject: [PATCH 1/2] =?UTF-8?q?chore=20:=20openapi3.yaml=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auth/src/main/resources/static/openapi3.yaml | 217 -------- .../src/main/resources/static/openapi3.yaml | 297 ----------- user/src/main/resources/static/openapi3.yaml | 494 ------------------ 3 files changed, 1008 deletions(-) delete mode 100644 auth/src/main/resources/static/openapi3.yaml delete mode 100644 server/src/main/resources/static/openapi3.yaml delete mode 100644 user/src/main/resources/static/openapi3.yaml diff --git a/auth/src/main/resources/static/openapi3.yaml b/auth/src/main/resources/static/openapi3.yaml deleted file mode 100644 index f1fdb50e..00000000 --- a/auth/src/main/resources/static/openapi3.yaml +++ /dev/null @@ -1,217 +0,0 @@ -openapi: 3.0.1 -info: - title: Auth API - description: API document - version: 0.1.0 -servers: -- url: http://localhost:30001 -tags: [] -paths: - /api/v1/access_token: - post: - tags: - - api - summary: 토큰 재발급(갱신) - description: 토큰 재발급(갱신) - operationId: post.v1.token - parameters: - - name: Authorization - in: header - description: jwt access token 정보 - required: true - schema: - type: string - example: test token - responses: - "200": - description: "200" - headers: - Authorization: - description: jwt access token 정보 - schema: - type: string - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-access_token260094762' - examples: - post.v1.token: - value: "{\r\n \"accessToken\" : \"testToken\",\r\n \"accessExpireAt\"\ - \ : \"1900-01-01T00:00:00\"\r\n}" - "400": - description: "400" - "500": - description: "500" - /api/v1/token: - post: - tags: - - api - summary: 토큰 생성 - description: 토큰 생성 - operationId: post_api.v1.token - parameters: - - name: Content-Type - in: header - description: application/json - required: true - schema: - type: string - example: application/json - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-token-816804784' - examples: - post_api.v1.token: - value: "{\r\n \"id\" : \"test\",\r\n \"nickname\" : \"mock user\"\ - \r\n}" - post_api.v1.token_400: - value: "{\r\n \"id\" : \"\",\r\n \"nickname\" : \"\"\r\n}" - post_api.v1.token_500: - value: "{\r\n \"id\" : \"test\",\r\n \"nickname\" : \"mock user\"\ - \r\n}" - responses: - "200": - description: "200" - headers: - Authorization: - description: jwt access token 정보 - schema: - type: string - Content-Type: - description: application/json - schema: - type: string - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-token-1585203635' - examples: - post_api.v1.token: - value: "{\r\n \"accessToken\" : \"Bearer access token\",\r\n \"\ - accessExpireAt\" : \"2000-01-01T00:00:00\",\r\n \"refreshToken\"\ - \ : \"Bearer refresh token\",\r\n \"refreshExpireAt\" : \"2000-01-01T00:01:00\"\ - \r\n}" - "400": - description: "400" - "500": - description: "500" - /api/v2/validation: - post: - tags: - - api - summary: 토큰 검증 - description: 토큰 검증 - operationId: post.v2.validation - parameters: - - name: Authorization - in: header - description: 검증할 토큰 정보 - required: true - schema: - type: string - example: Bearer testtoken - responses: - "200": - description: "200" - headers: - Content-type: - description: entity type - schema: - type: string - content: - application/json: - schema: - $ref: '#/components/schemas/api-v2-validation1091437307' - examples: - post.v2.validation200: - value: "{\r\n \"data\" : {\r\n \"type\" : \"ACCESS\",\r\n \ - \ \"userId\" : \"testUserId\"\r\n }\r\n}" - "400": - description: "400" - "500": - description: "500" - /api/v1/token/{jwtToken}: - delete: - tags: - - api - summary: 토큰 만료(삭제) - description: 토큰 만료(삭제) - operationId: delete_api.v1.token - parameters: - - name: jwtToken - in: path - description: "" - required: true - schema: - type: string - responses: - "200": - description: "200" - "400": - description: "400" - "500": - description: "500" -components: - schemas: - api-v1-token-816804784: - required: - - id - - nickname - type: object - properties: - nickname: - type: string - description: 닉네임 - id: - type: string - description: 유저 식별 아이디 - api-v2-validation1091437307: - type: object - properties: - data: - required: - - type - - userId - type: object - properties: - type: - type: string - description: ACCESS 또는 REFRESH 값을 가지며 검증한 토큰의 타입입니다. 만약 유효하지 않은 토큰이라면 - 존재하지 않습니다. - userId: - type: string - description: 토큰에 저장된 유저의 id - api-v1-access_token260094762: - required: - - accessExpireAt - - accessToken - type: object - properties: - accessExpireAt: - type: string - description: jwt access token 만료시간 형식은 yyyy-MM-dd hh:mm:ss을 제공합니다. - accessToken: - type: string - description: jwt access token - api-v1-token-1585203635: - required: - - accessExpireAt - - accessToken - - refreshExpireAt - - refreshToken - type: object - properties: - accessExpireAt: - type: string - description: jwt access token 만료시간입니다. 형식은 yyyy-MM-dd hh:mm:ss을 제공합니다. - refreshExpireAt: - type: string - description: jwt refresh token 만료시간 형식은 yyyy-MM-dd hh:mm:ss을 제공합니다. - accessToken: - type: string - description: jwt access token - refreshToken: - type: string - description: jwt refresh token diff --git a/server/src/main/resources/static/openapi3.yaml b/server/src/main/resources/static/openapi3.yaml deleted file mode 100644 index 22407421..00000000 --- a/server/src/main/resources/static/openapi3.yaml +++ /dev/null @@ -1,297 +0,0 @@ -openapi: 3.0.1 -info: - title: Server API - description: API document - version: 0.1.0 -servers: -- url: http://localhost:30001 -tags: [] -paths: - /api/v1/server: - get: - tags: - - api - summary: 서버 목록 조회 api - description: 서버 목록 조회 api - operationId: get_server_list_info_200 - parameters: - - name: serverIds - in: query - description: 조회시 해당 서버 목록만을 조회합니다. 값이 없다면 조건은 적용되지 않습니다. - required: true - schema: - type: string - - name: Authorization - in: header - description: jwt access token - required: true - schema: - type: string - example: Bearer test_token - responses: - "200": - description: "200" - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-server-333958256' - examples: - get_server_list_info_200: - value: |- - { - "data" : [ { - "id" : "server1", - "name" : "test_server", - "bookmarked" : false - }, { - "id" : "server2", - "name" : "test_server", - "bookmarked" : true - } ] - } - post: - tags: - - api - summary: 서버 생성 api - description: 서버 생성 api - operationId: create_server_200 - parameters: - - name: Authorization - in: header - description: jwt access token - required: true - schema: - type: string - example: Bearer mock_token - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-server-1104088939' - examples: - create_server_200: - value: |- - { - "serverName" : "test server" - } - responses: - "200": - description: "200" - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-server1708269356' - examples: - create_server_200: - value: |- - { - "data" : { - "serverId" : "1", - "serverName" : "test server" - } - } - /api/v1/server/{serverId}: - get: - tags: - - api - summary: 서버 단건 조회 api - description: 서버 단건 조회 api - operationId: get_server_info_ - parameters: - - name: serverId - in: path - description: 서버 id - required: true - schema: - type: string - responses: - "404": - description: "404" - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-server-serverId1647452815' - examples: - get_server_info_with_invalid_id: - value: |- - { - "message" : "요청한 자원을 찾을 수 없습니다." - } - "200": - description: "200" - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-server-serverId-187176522' - examples: - get_server_info_200: - value: |- - { - "data" : { - "id" : "test_server_id", - "name" : "test_server", - "users" : [ ] - } - } - /api/v1/server/{serverId}/user: - put: - tags: - - api - summary: 서버 가입 api - description: 서버 가입 api - operationId: add_invited_user_200 - parameters: - - name: serverId - in: path - description: 서버 id - required: true - schema: - type: string - - name: Authorization - in: header - description: jwt access token - required: true - schema: - type: string - example: Bearer mock_token - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-server-serverId-user1444998761' - examples: - add_invited_user_200: - value: |- - { - "userId" : "userId", - "userName" : "test", - "profileImage" : "test" - } - responses: - "200": - description: "200" - /api/v1/server/{serverId}/invitation/{userId}: - put: - tags: - - api - summary: 서버 초대 api - description: 서버 초대 api - operationId: invite_user_200 - parameters: - - name: serverId - in: path - description: 서버 id - required: true - schema: - type: string - - name: userId - in: path - description: 초대할 유저 id - required: true - schema: - type: string - - name: Authorization - in: header - description: jwt access token - required: true - schema: - type: string - example: Bearer mock_token - responses: - "200": - description: "200" -components: - schemas: - api-v1-server-serverId-187176522: - type: object - properties: - data: - required: - - id - - name - - users - type: object - properties: - name: - type: string - description: 생성된 서버 이름 - id: - type: string - description: 서버 id - users: - type: array - description: 서버에 가입된 유저 목록 - items: - oneOf: - - type: object - - type: boolean - - type: string - - type: number - api-v1-server-1104088939: - required: - - serverName - type: object - properties: - serverName: - type: string - description: 생성할 서버의 이름 - api-v1-server-333958256: - type: object - properties: - data: - type: array - items: - required: - - bookmarked - - id - - name - type: object - properties: - bookmarked: - type: boolean - description: 북마크 여부 - name: - type: string - description: 서버 이름 - id: - type: string - description: 서버 id - api-v1-server-serverId-user1444998761: - required: - - profileImage - - userId - - userName - type: object - properties: - profileImage: - type: string - description: 가입할 유저 프로필 이미지 - userName: - type: string - description: 가입할 유저 이름 - userId: - type: string - description: 가입할 유저 id - api-v1-server-serverId1647452815: - required: - - message - type: object - properties: - message: - type: string - description: 실패 관련 메시지 - api-v1-server1708269356: - type: object - properties: - data: - required: - - serverId - - serverName - type: object - properties: - serverName: - type: string - description: 생성된 서버 이름 - serverId: - type: string - description: 서버 id diff --git a/user/src/main/resources/static/openapi3.yaml b/user/src/main/resources/static/openapi3.yaml deleted file mode 100644 index 84558573..00000000 --- a/user/src/main/resources/static/openapi3.yaml +++ /dev/null @@ -1,494 +0,0 @@ -openapi: 3.0.1 -info: - title: User API - description: API document - version: 0.1.0 -servers: -- url: http://localhost:30002 -tags: [] -paths: - /api/v1/login: - post: - tags: - - api - summary: 로그인 API - description: 로그인 API - operationId: login - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-login1625419177' - examples: - login500: - value: |- - { - "email" : "test@naver.com", - "password" : "TestPW1234!" - } - login200: - value: |- - { - "email" : "test@email.com", - "password" : "TestPW1234!" - } - login400: - value: |- - { - "email" : "test@gmail.com", - "password" : "TestPW1234!" - } - responses: - "500": - description: "500" - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-logout486549215' - examples: - login500: - value: |- - { - "message" : "서버 오류" - } - "200": - description: "200" - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-login-74655746' - examples: - login200: - value: |- - { - "data" : { - "accessToken" : "accessToken", - "refreshToken" : "refreshToken" - } - } - "400": - description: "400" - /api/v1/logout: - post: - tags: - - api - summary: 로그아웃 API - description: 로그아웃 API - operationId: logout - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-logout1066400619' - examples: - logout400: - value: |- - { - "accessToken" : "accessToken", - "refreshToken" : "refreshToken" - } - logout200: - value: |- - { - "accessToken" : "accessToken", - "refreshToken" : "refreshToken" - } - logout500: - value: |- - { - "accessToken" : "accessToken", - "refreshToken" : "refreshToken" - } - responses: - "400": - description: "400" - "200": - description: "200" - "500": - description: "500" - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-logout486549215' - examples: - logout500: - value: |- - { - "message" : "서버 오류" - } - /api/v1/user: - post: - tags: - - api - summary: 회원가입 API - description: 회원가입 API - operationId: createUser - parameters: - - name: Content-Type - in: header - description: application/json - required: true - schema: - type: string - example: application/json - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-user879154472' - examples: - createUser400: - value: |- - { - "email" : null, - "password" : "tesT@1234", - "username" : "testuser" - } - createUser500: - value: |- - { - "email" : "test@email.com", - "password" : "tesT@1234", - "username" : "testuser" - } - createUser200: - value: |- - { - "email" : "test@email.com", - "password" : "tesT@1234", - "username" : "testuser" - } - responses: - "400": - description: "400" - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-user-userId475340455' - examples: - createUser400: - value: |- - { - "message" : "이메일이 누락되었습니다." - } - "500": - description: "500" - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-user-userId475340455' - examples: - createUser500: - value: |- - { - "message" : "서버 오류" - } - "200": - description: "200" - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-logout486549215' - examples: - createUser200: - value: |- - { - "data" : { - "id" : null, - "email" : null - } - } - /api/v1/user/{userId}: - get: - tags: - - api - summary: 프로필 조회 API - description: 프로필 조회 API - operationId: getUserProfile - parameters: - - name: userId - in: path - description: 사용자 아이디 - required: true - schema: - type: string - - name: Authorization - in: header - description: Bearer token - required: true - schema: - type: string - example: Bearer test - responses: - "200": - description: "200" - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-user-userId-73471858' - examples: - getUserProfile200: - value: |- - { - "data" : { - "userId" : 1, - "email" : "test@email.com", - "username" : "testuser" - } - } - "403": - description: "403" - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-user-userId475340455' - examples: - getUserProfile403: - value: |- - { - "message" : "Not allowed" - } - "500": - description: "500" - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-user-userId475340455' - examples: - getUserProfile500: - value: |- - { - "message" : "서버 오류" - } - delete: - tags: - - api - summary: 탈퇴 API - description: 탈퇴 API - operationId: exitUser - parameters: - - name: userId - in: path - description: 사용자 아이디 - required: true - schema: - type: string - - name: Authorization - in: header - description: jwt 토큰 정보 - required: true - schema: - type: string - example: Bearer token - responses: - "200": - description: "200" - "403": - description: "403" - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-logout486549215' - examples: - exitUser403: - value: |- - { - "message" : "Not allowed" - } - "500": - description: "500" - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-user-userId475340455' - examples: - exitUser500: - value: |- - { - "message" : "서버 오류" - } - patch: - tags: - - api - summary: 회원정보 수정 API - description: 회원정보 수정 API - operationId: updateUser - parameters: - - name: userId - in: path - description: "" - required: true - schema: - type: string - - name: Content-Type - in: header - description: application/json - required: true - schema: - type: string - example: application/json - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-user-userId-283233779' - examples: - updateUser500: - value: |- - { - "email" : "test@test.com" - } - updateUser200: - value: |- - { - "email" : "test@test.com" - } - updateUser403: - value: |- - { - "email" : "test@test.com" - } - responses: - "500": - description: "500" - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-user-userId475340455' - examples: - updateUser500: - value: |- - { - "message" : "서버 오류" - } - "200": - description: "200" - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-user-userId-92182952' - examples: - updateUser200: - value: |- - { - "data" : { - "email" : "test@test.com" - } - } - "403": - description: "403" - content: - application/json: - schema: - $ref: '#/components/schemas/api-v1-user-userId475340455' - examples: - updateUser403: - value: |- - { - "message" : "Not allowed" - } -components: - schemas: - api-v1-user-userId-73471858: - type: object - properties: - data: - required: - - email - - userId - - username - type: object - properties: - userId: - type: string - description: 사용자 아이디 - email: - type: string - description: 이메일 - username: - type: string - description: 닉네임 - api-v1-user-userId475340455: - required: - - message - type: object - properties: - message: - type: string - description: 에러 메시지 - api-v1-login-74655746: - type: object - properties: - data: - required: - - accessToken - - refreshToken - type: object - properties: - accessToken: - type: string - description: accessToken - refreshToken: - type: string - description: refreshToken - api-v1-user-userId-283233779: - required: - - email - type: object - properties: - email: - type: string - description: 이메일 - api-v1-logout1066400619: - required: - - accessToken - - refreshToken - type: object - properties: - accessToken: - type: string - description: accessToken - refreshToken: - type: string - description: refreshToken - api-v1-login1625419177: - required: - - email - - password - type: object - properties: - password: - type: string - description: password - email: - type: string - description: email - api-v1-user-userId-92182952: - type: object - properties: - data: - required: - - email - type: object - properties: - email: - type: string - description: 이메일 - api-v1-user879154472: - required: - - email - - password - - username - type: object - properties: - password: - type: string - description: 비밀번호 - email: - type: string - description: 이메일 - username: - type: string - description: 사용자 이름 - api-v1-logout486549215: - type: object From 940671e185b695938d59b68079d7a3748ead9459 Mon Sep 17 00:00:00 2001 From: yudonggeun Date: Wed, 5 Jun 2024 14:26:51 +0900 Subject: [PATCH 2/2] =?UTF-8?q?chore=20:=20.gitignore=20openapi3.yaml=20?= =?UTF-8?q?=EB=AC=B4=EC=8B=9C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auth/.gitignore | 3 +++ chat/.gitignore | 3 +++ server/.gitignore | 2 ++ user/.gitignore | 3 +++ 4 files changed, 11 insertions(+) diff --git a/auth/.gitignore b/auth/.gitignore index 5a979af6..007c2346 100644 --- a/auth/.gitignore +++ b/auth/.gitignore @@ -38,3 +38,6 @@ out/ ### Kotlin ### .kotlin + +### api docs ### +/src/main/resources/static/openapi3.yaml diff --git a/chat/.gitignore b/chat/.gitignore index 5a979af6..007c2346 100644 --- a/chat/.gitignore +++ b/chat/.gitignore @@ -38,3 +38,6 @@ out/ ### Kotlin ### .kotlin + +### api docs ### +/src/main/resources/static/openapi3.yaml diff --git a/server/.gitignore b/server/.gitignore index 5a979af6..c9d23ba7 100644 --- a/server/.gitignore +++ b/server/.gitignore @@ -38,3 +38,5 @@ out/ ### Kotlin ### .kotlin +### api docs ### +/src/main/resources/static/openapi3.yaml diff --git a/user/.gitignore b/user/.gitignore index 5a979af6..007c2346 100644 --- a/user/.gitignore +++ b/user/.gitignore @@ -38,3 +38,6 @@ out/ ### Kotlin ### .kotlin + +### api docs ### +/src/main/resources/static/openapi3.yaml