forked from swagger-api/swagger-ui
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathswagger.json
More file actions
1 lines (1 loc) · 19.2 KB
/
swagger.json
File metadata and controls
1 lines (1 loc) · 19.2 KB
1
{"openapi":"3.1.0","info":{"title":"WeatherTago API","description":"WeatherTago API 명세서","version":"3.0.0"},"servers":[{"url":"/"}],"security":[{"JWT TOKEN":[]}],"tags":[{"name":"Favorite","description":"즐겨찾기 관련 API"},{"name":"AlarmPushToken","description":"알림 pushToken API"},{"name":"StationPath","description":"경로 찾기 API"},{"name":"User","description":"유저 관련 API"},{"name":"Notice","description":"공지사항 조회 API"},{"name":"Auth","description":"카카오 소셜 로그인 및 JWT 토큰 관련 API"},{"name":"Station","description":"지하철역 정보 관련 API"},{"name":"Alarm","description":"알림 API"}],"paths":{"/api/users/me/pushtokens":{"get":{"tags":["AlarmPushToken"],"summary":"pushToken 전체 조회","description":"사용자 ID에 해당하는 모든 기기의 PushToken을 조회합니다.","operationId":"getPushTokens","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseSetString"}}}}}},"post":{"tags":["AlarmPushToken"],"summary":"pushToken 추가","description":"로그인 시 사용자 ID에 해당하는 PushToken을 추가합니다.","operationId":"addPushToken","parameters":[{"name":"pushToken","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}}},"delete":{"tags":["AlarmPushToken"],"summary":"pushToken 삭제","description":"로그아웃 시 사용자 ID에 해당하는 PushToken을 삭제합니다.","operationId":"removePushToken","parameters":[{"name":"pushToken","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}}}},"/api/users/me/favorite":{"get":{"tags":["Favorite"],"summary":"즐겨찾기 목록 조회","description":"즐겨찾기 목록에 있는 역들을 조회합니다.","operationId":"getMyFavorite","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseFavoriteResultDTO"}}}}}},"post":{"tags":["Favorite"],"summary":"즐겨찾기 등록","description":"즐겨찾기 목록에 지하철역을 등록합니다.","operationId":"addFavorite","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FavoriteRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}}},"delete":{"tags":["Favorite"],"summary":"즐겨찾기 삭제","description":"즐겨찾기 목록에 있는 지하철역을 삭제합니다.","operationId":"removeFavorite","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FavoriteRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}}}},"/api/users/me/alarms":{"get":{"tags":["Alarm"],"summary":"모든 알림 조회","description":"사용자의 모든 알림을 조회합니다.","operationId":"getAlarms","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListAlarmDetailDTO"}}}}}},"post":{"tags":["Alarm"],"summary":"알림 생성","description":"알림을 생성하고 알림 id를 반환합니다.","operationId":"createAlarm","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlarmCreateRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseAlarmDetailDTO"}}}}}}},"/api/station/initialize":{"post":{"tags":["Station"],"summary":"DB 초기화","description":"DB에 지하철역 정보를 저장합니다.","operationId":"initializeStations","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseString"}}}}}}},"/api/auth/reissue":{"post":{"tags":["Auth"],"summary":"토큰 재발급","description":"refreshToken으로 accessToken을 재발급합니다.","operationId":"reissue","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReissueRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseReissueResultDTO"}}}}}}},"/api/auth/logout":{"post":{"tags":["Auth"],"summary":"로그아웃","description":"JWT를 블랙리스트 처리하고 리프레시 토큰을 만료시킵니다.","operationId":"logout","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}}}},"/api/auth/login":{"post":{"tags":["Auth"],"summary":"카카오 로그인","description":"카카오 accessToken으로 로그인/회원가입을 처리하고 JWT를 발급합니다.","operationId":"login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KakaoLoginRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseLoginResultDTO"}}}}}}},"/api/users/me/alarms/{alarm_id}":{"get":{"tags":["Alarm"],"summary":"특정 알림 조회","description":"사용자의 특정 알림을 조회합니다.","operationId":"getAlarmDetail","parameters":[{"name":"alarm_id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseAlarmDetailDTO"}}}}}},"delete":{"tags":["Alarm"],"summary":"알림 삭제","description":"알림을 삭제합니다.","operationId":"deleteAlarm","parameters":[{"name":"alarm_id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}}},"patch":{"tags":["Alarm"],"summary":"알림 수정","description":"알림을 수정합니다.","operationId":"updateAlarm","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlarmUpdateRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}}}},"/api/users/me":{"get":{"tags":["User"],"summary":"내 정보 조회","description":"로그인한 사용자의 닉네임과 이메일을 반환합니다.","operationId":"getMyInfo","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseUserInfoResponseDTO"}}}}}}},"/api/users/me/favorite/detail":{"get":{"tags":["Favorite"],"summary":"즐겨찾기 내 특정 역 상세 조회","description":"즐겨찾기 내 특정 역을 조회합니다.","operationId":"getStationDetailById","parameters":[{"name":"stationId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"time","in":"query","required":true,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseJoinResultDTO"}}}}}}},"/api/subway/path":{"get":{"tags":["StationPath"],"summary":"경로 찾기","description":"역과 역 사이의 경로를 조회합니다.","operationId":"getPath","parameters":[{"name":"startStationId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"endStationId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"time","in":"query","required":true,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseSubwayPathDTO"}}}}}}},"/api/station/status":{"get":{"tags":["Station"],"summary":"지하철역 시간대별 상태 조회","description":"현재 시각부터 3일 뒤 00시까지의 날씨와 혼잡도 정보를 시간대별로 조회합니다.","operationId":"getStatus","parameters":[{"name":"stationId","in":"query","description":"조회할 역의 ID","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMapStringDirectionalData"}}}}}}},"/api/station/search":{"get":{"tags":["Station"],"summary":"지하철역 정보 조회","description":"원하는 시간대의 지하철역의 정보를 조회합니다.","operationId":"getStationById","parameters":[{"name":"stationId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"time","in":"query","required":true,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseJoinResultDTO"}}}}}}},"/api/station/info":{"get":{"tags":["Station"],"summary":"지하철역 기본 정보 조회","description":"지하철역 id, 이름, 호선을 조회합니다.","operationId":"getAllSimpleStations","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListSimpleStationDTO"}}}}}}},"/api/station/detailInfo":{"get":{"tags":["Station"],"summary":"지하철역 상세 정보 조회","description":"지하철역의 id, 이름, 호선, 전화번호, 주소를 조회합니다. ","operationId":"getAllStationsInfo","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListStationInfoDTO"}}}}}}},"/api/notice":{"get":{"tags":["Notice"],"summary":"공지사항 전체 조회","description":"DB에 저장된 모든 공지사항을 최신순으로 조회합니다.","operationId":"getNotices","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListNoticeDetail"}}}}}}},"/api/notice/{notice_id}":{"get":{"tags":["Notice"],"summary":"특정 공지사항 조회","description":"특정 공지사항을 id로 조회합니다.","operationId":"getNotice","parameters":[{"name":"notice_id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseNoticeDetail"}}}}}}},"/api/users/withdraw":{"delete":{"tags":["User"],"summary":"회원 탈퇴","description":"회원 정보를 삭제하고 토큰을 무효화합니다.","operationId":"withdraw","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}}}},"/api/users/me/pushtokens/all":{"delete":{"tags":["AlarmPushToken"],"summary":"pushToken 전체 삭제","description":"회원 탈퇴 시 사용자 ID에 해당하는 모든 기기의 PushToken을 삭제합니다.","operationId":"removeAllPushTokens","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}}}}},"components":{"schemas":{"ApiResponseVoid":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"},"result":{"type":"object"}}},"FavoriteRequestDTO":{"type":"object","properties":{"stationId":{"type":"integer","format":"int64"}}},"AlarmCreateRequestDTO":{"type":"object","properties":{"stationName":{"type":"string"},"stationLine":{"type":"string"},"direction":{"type":"string"},"referenceTime":{"type":"string"},"alarmPeriod":{"type":"string","enum":["EVERYDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]},"alarmDay":{"type":"string","enum":["TODAY","YESTERDAY"]},"alarmTime":{"type":"string"}}},"AlarmDetailDTO":{"type":"object","properties":{"alarmId":{"type":"integer","format":"int64"},"stationName":{"type":"string"},"stationLine":{"type":"string"},"direction":{"type":"string"},"referenceTime":{"type":"string"},"alarmPeriod":{"type":"string","enum":["EVERYDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]},"alarmDay":{"type":"string","enum":["TODAY","YESTERDAY"]},"alarmTime":{"type":"string"}}},"ApiResponseAlarmDetailDTO":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"},"result":{"$ref":"#/components/schemas/AlarmDetailDTO"}}},"ApiResponseString":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"},"result":{"type":"string"}}},"ReissueRequest":{"type":"object","properties":{"refreshToken":{"type":"string","minLength":1}}},"ApiResponseReissueResultDTO":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"},"result":{"$ref":"#/components/schemas/ReissueResultDTO"}}},"ReissueResultDTO":{"type":"object","properties":{"accessToken":{"type":"string"},"refreshToken":{"type":"string"}}},"KakaoLoginRequest":{"type":"object","properties":{"accessToken":{"type":"string","minLength":1}}},"ApiResponseLoginResultDTO":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"},"result":{"$ref":"#/components/schemas/LoginResultDTO"}}},"LoginResultDTO":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"newUser":{"type":"boolean"}}},"AlarmUpdateRequestDTO":{"type":"object","properties":{"alarmId":{"type":"integer","format":"int64"},"stationName":{"type":"string"},"stationLine":{"type":"string"},"direction":{"type":"string"},"referenceTime":{"type":"string"},"alarmPeriod":{"type":"string","enum":["EVERYDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]},"alarmDay":{"type":"string","enum":["TODAY","YESTERDAY"]},"alarmTime":{"type":"string"}}},"ApiResponseUserInfoResponseDTO":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"},"result":{"$ref":"#/components/schemas/UserInfoResponseDTO"}}},"UserInfoResponseDTO":{"type":"object","properties":{"nickname":{"type":"string"},"email":{"type":"string"}}},"ApiResponseSetString":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"},"result":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"ApiResponseFavoriteResultDTO":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"},"result":{"$ref":"#/components/schemas/FavoriteResultDTO"}}},"FavoriteResultDTO":{"type":"object","properties":{"favoriteId":{"type":"integer","format":"int64"},"stations":{"type":"array","items":{"$ref":"#/components/schemas/StationDTO"}}}},"StationDTO":{"type":"object","properties":{"stationId":{"type":"integer","format":"int64"},"stationName":{"type":"string"},"stationLine":{"type":"string"}}},"ApiResponseJoinResultDTO":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"},"result":{"$ref":"#/components/schemas/JoinResultDTO"}}},"DirectionalStationDTO":{"type":"object","properties":{"stationId":{"type":"integer","format":"int64"},"congestion":{"$ref":"#/components/schemas/PredictionResponseDTO"}}},"JoinResultDTO":{"type":"object","properties":{"stationId":{"type":"integer","format":"int64"},"name":{"type":"string"},"line":{"type":"string"},"stationCode":{"type":"string"},"direction":{"type":"string"},"weather":{"$ref":"#/components/schemas/WeatherResponseDTO"},"congestionByDirection":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/DirectionalStationDTO"}},"createdAt":{"type":"string","format":"date-time","example":"2025-07-08T22:40:00"}}},"PredictionResponseDTO":{"type":"object","properties":{"congestionScore":{"type":"number","format":"double"},"congestionLevel":{"type":"string"}}},"WeatherResponseDTO":{"type":"object","properties":{"tmp":{"type":"number","format":"double"},"reh":{"type":"number","format":"double"},"pcp":{"type":"number","format":"double"},"wsd":{"type":"number","format":"double"},"sno":{"type":"number","format":"double"},"vec":{"type":"number","format":"double"},"status":{"type":"string"}}},"ApiResponseListAlarmDetailDTO":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"},"result":{"type":"array","items":{"$ref":"#/components/schemas/AlarmDetailDTO"}}}},"ApiResponseSubwayPathDTO":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"},"result":{"$ref":"#/components/schemas/SubwayPathDTO"}}},"StationInfo":{"type":"object","properties":{"stationId":{"type":"string"},"stationName":{"type":"string"},"line":{"type":"string"},"direction":{"type":"string"},"congestion":{"$ref":"#/components/schemas/PredictionResponseDTO"}}},"SubwayPathDTO":{"type":"object","properties":{"totalTime":{"type":"string"},"totalDistance":{"type":"string"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/SubwayStepDto"}}}},"SubwayStepDto":{"type":"object","properties":{"line":{"type":"string"},"startStation":{"$ref":"#/components/schemas/StationInfo"},"endStation":{"$ref":"#/components/schemas/StationInfo"},"allStations":{"type":"array","items":{"$ref":"#/components/schemas/StationInfo"}}}},"ApiResponseMapStringDirectionalData":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"},"result":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/DirectionalData"}}}},"DirectionalData":{"type":"object","properties":{"weathers":{"type":"array","items":{"$ref":"#/components/schemas/TimedWeatherDTO"}},"congestions":{"type":"array","items":{"$ref":"#/components/schemas/TimedCongestionDTO"}}}},"TimedCongestionDTO":{"type":"object","properties":{"datetime":{"type":"string"},"prediction":{"$ref":"#/components/schemas/PredictionResponseDTO"}}},"TimedWeatherDTO":{"type":"object","properties":{"datetime":{"type":"string"},"weather":{"$ref":"#/components/schemas/WeatherResponseDTO"}}},"ApiResponseListSimpleStationDTO":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"},"result":{"type":"array","items":{"$ref":"#/components/schemas/SimpleStationDTO"}}}},"SimpleStationDTO":{"type":"object","properties":{"stationId":{"type":"integer","format":"int64"},"stationName":{"type":"string"},"stationLine":{"type":"string"}}},"ApiResponseListStationInfoDTO":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"},"result":{"type":"array","items":{"$ref":"#/components/schemas/StationInfoDTO"}}}},"StationInfoDTO":{"type":"object","properties":{"stationId":{"type":"integer","format":"int64"},"stationName":{"type":"string"},"stationLine":{"type":"string"},"phoneNumber":{"type":"string"},"address":{"type":"string"}}},"ApiResponseListNoticeDetail":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"},"result":{"type":"array","items":{"$ref":"#/components/schemas/NoticeDetail"}}}},"NoticeDetail":{"type":"object","properties":{"noticeId":{"type":"integer","format":"int64"},"title":{"type":"string"},"content":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}},"ApiResponseNoticeDetail":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"},"result":{"$ref":"#/components/schemas/NoticeDetail"}}}},"securitySchemes":{"JWT TOKEN":{"type":"http","name":"JWT TOKEN","scheme":"bearer","bearerFormat":"JWT"}}}}