-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser-service.json
More file actions
1 lines (1 loc) · 8.21 KB
/
Copy pathuser-service.json
File metadata and controls
1 lines (1 loc) · 8.21 KB
1
{"openapi":"3.1.0","info":{"title":"KOK User Service API","description":"회원가입, 로그인/토큰 재발급, 회원 조회, OWNER 승인/거절 API","version":"v1"},"servers":[{"url":"http://localhost:8000","description":"Gateway"}],"tags":[{"name":"Internal","description":"내부 서비스 통신 API"},{"name":"User","description":"사용자 API"},{"name":"Auth","description":"인증 API"}],"paths":{"/api/v1/users/signup":{"post":{"tags":["User"],"summary":"일반 사용자 회원가입","operationId":"signupUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseSignupResponse"}}}}}}},"/api/v1/owners/signup":{"post":{"tags":["User"],"summary":"사장님(OWNER) 회원가입","operationId":"signupOwner","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseSignupResponse"}}}}}}},"/api/v1/auth/refresh":{"post":{"tags":["Auth"],"summary":"토큰 재발급","operationId":"refresh","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenRefreshRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseRefresh"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["Auth"],"summary":"로그인","operationId":"login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseLoginResponse"}}}}}}},"/api/v1/admin/owners/approvals/{approvalId}/reject":{"patch":{"tags":["User"],"summary":"OWNER 거절","operationId":"rejectOwner","parameters":[{"name":"approvalId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Role","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseOwnerApprovalResponse"}}}}}}},"/api/v1/admin/owners/approvals/{approvalId}/approve":{"patch":{"tags":["User"],"summary":"OWNER 승인","operationId":"approveOwner","parameters":[{"name":"approvalId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Role","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseOwnerApprovalResponse"}}}}}}},"/api/v1/users/{userId}":{"get":{"tags":["User"],"summary":"회원 상세 조회 (MASTER)","operationId":"getUserById","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Role","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseUserDetailResponse"}}}}}}},"/api/v1/users/me":{"get":{"tags":["User"],"summary":"내 정보 조회","operationId":"getMyInfo","parameters":[{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseUserDetailResponse"}}}}}}},"/api/v1/internal/users/{userId}/owner-approval":{"get":{"tags":["Internal"],"summary":"OWNER 승인 상태 조회 (내부용)","operationId":"getOwnerApprovalStatus","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseOwnerApprovalStatusResponse"}}}}}}},"/api/v1/admin/owners/approvals":{"get":{"tags":["User"],"summary":"승인 대기 목록 조회 (MASTER)","operationId":"getPendingApprovals","parameters":[{"name":"X-Role","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListOwnerApprovalResponse"}}}}}}}},"components":{"schemas":{"SignupRequest":{"type":"object","properties":{"username":{"type":"string","maxLength":100,"minLength":0},"password":{"type":"string","maxLength":100,"minLength":8,"pattern":"^(?=.*[A-Z])(?=.*[!@#$%^&*()_+=\\-{}\\[\\]:;\"'<>,.?/]).+$"},"name":{"type":"string","maxLength":20,"minLength":0},"email":{"type":"string","maxLength":100,"minLength":0},"phone":{"type":"string","maxLength":20,"minLength":0},"slackId":{"type":"string","maxLength":100,"minLength":0},"role":{"type":"string","enum":["USER","OWNER","MASTER"]}},"required":["email","name","password","phone","role","username"]},"ApiResponseSignupResponse":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/SignupResponse"}}},"SignupResponse":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"username":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["USER","OWNER","MASTER"]},"message":{"type":"string"}}},"TokenRefreshRequest":{"type":"object","properties":{"refreshToken":{"type":"string","minLength":1}},"required":["refreshToken"]},"ApiResponseRefresh":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Refresh"},"errors":{}}},"Refresh":{"type":"object","properties":{"accessToken":{"type":"string"},"refreshToken":{"type":"string"}}},"LoginRequest":{"type":"object","properties":{"username":{"type":"string","minLength":1},"password":{"type":"string","minLength":1}},"required":["password","username"]},"ApiResponseLoginResponse":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/LoginResponse"},"errors":{}}},"LoginResponse":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"username":{"type":"string"},"role":{"type":"string"},"accessToken":{"type":"string"},"refreshToken":{"type":"string"}}},"ApprovalRequest":{"type":"object","properties":{"rejectReason":{"type":"string","maxLength":200,"minLength":0}}},"ApiResponseOwnerApprovalResponse":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/OwnerApprovalResponse"}}},"OwnerApprovalResponse":{"type":"object","properties":{"approvalId":{"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"username":{"type":"string"},"status":{"type":"string","enum":["PENDING","APPROVED","REJECTED"]},"rejectReason":{"type":"string"},"processedAt":{"type":"string","format":"date-time"},"processedBy":{"type":"string","format":"uuid"}}},"ApiResponseUserDetailResponse":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/UserDetailResponse"}}},"UserDetailResponse":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"username":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"slackId":{"type":"string"},"role":{"type":"string","enum":["USER","OWNER","MASTER"]}}},"ApiResponseOwnerApprovalStatusResponse":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/OwnerApprovalStatusResponse"}}},"OwnerApprovalStatusResponse":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"approved":{"type":"boolean"}}},"ApiResponseListOwnerApprovalResponse":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/OwnerApprovalResponse"}}}}}}}