-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
177 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
{ | ||
"openapi": "3.0.1", | ||
"info": { | ||
"title": "noti-service API", | ||
"description": "Waither noti-service API 명세서입니다.", | ||
"version": "v0.0.1" | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "/" | ||
} | ||
], | ||
"paths": { | ||
"/api/v1/noti/goOut": { | ||
"post": { | ||
"tags": [ | ||
"notification-controller" | ||
], | ||
"summary": "Send Go Out Alarm", | ||
"description": "외출 알림 전송하기", | ||
"operationId": "sendGoOutAlarm", | ||
"parameters": [ | ||
{ | ||
"name": "userId", | ||
"in": "query", | ||
"required": true, | ||
"schema": { | ||
"type": "integer", | ||
"format": "int64" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"500": { | ||
"description": "INTERNAL SERVER ERROR" | ||
}, | ||
"200": { | ||
"description": "OK" | ||
}, | ||
"404": { | ||
"description": "NOT FOUND" | ||
}, | ||
"400": { | ||
"description": "BAD REQUEST" | ||
} | ||
} | ||
} | ||
}, | ||
"/api/v1/noti/": { | ||
"post": { | ||
"tags": [ | ||
"notification-controller" | ||
], | ||
"operationId": "checkCurrentAlarm", | ||
"requestBody": { | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/LocationDto" | ||
} | ||
} | ||
}, | ||
"required": true | ||
}, | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
} | ||
} | ||
} | ||
}, | ||
"/api/v1/noti": { | ||
"get": { | ||
"tags": [ | ||
"notification-controller" | ||
], | ||
"summary": "get notification", | ||
"description": "알림 목록 조회하기", | ||
"operationId": "getNotifications", | ||
"parameters": [ | ||
{ | ||
"name": "userId", | ||
"in": "query", | ||
"required": true, | ||
"schema": { | ||
"type": "integer", | ||
"format": "int64" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"500": { | ||
"description": "INTERNAL SERVER ERROR", | ||
"content": { | ||
"*/*": { | ||
"schema": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/components/schemas/NotificationResponse" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"200": { | ||
"description": "OK", | ||
"content": { | ||
"*/*": { | ||
"schema": { | ||
"$ref": "#/components/schemas/NotificationResponse" | ||
} | ||
} | ||
} | ||
}, | ||
"404": { | ||
"description": "NOT FOUND", | ||
"content": { | ||
"*/*": { | ||
"schema": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/components/schemas/NotificationResponse" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"400": { | ||
"description": "BAD REQUEST", | ||
"content": { | ||
"*/*": { | ||
"schema": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/components/schemas/NotificationResponse" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"components": { | ||
"schemas": { | ||
"LocationDto": { | ||
"type": "object", | ||
"properties": { | ||
"x": { | ||
"type": "number", | ||
"format": "double" | ||
}, | ||
"y": { | ||
"type": "number", | ||
"format": "double" | ||
} | ||
} | ||
}, | ||
"NotificationResponse": { | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "string" | ||
}, | ||
"time": { | ||
"type": "string", | ||
"format": "date-time" | ||
}, | ||
"message": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |