mirror of
https://github.com/valitydev/swag-fraudbusters-management.git
synced 2024-11-06 08:15:21 +00:00
refactoring channels
This commit is contained in:
parent
5141b2137f
commit
88c4ad1d0c
6
openapi/components/parameters/notificationName.yaml
Normal file
6
openapi/components/parameters/notificationName.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
name: notificationName
|
||||
in: path
|
||||
description: Название нотификации
|
||||
required: true
|
||||
schema:
|
||||
$ref: '../schemas/NotificationName.yaml'
|
@ -3,4 +3,6 @@ required:
|
||||
- result
|
||||
properties:
|
||||
result:
|
||||
$ref: '../schemas/Channel.yaml'
|
||||
type: array
|
||||
items:
|
||||
$ref: '../schemas/Channel.yaml'
|
||||
|
@ -0,0 +1,8 @@
|
||||
type: object
|
||||
required:
|
||||
- result
|
||||
properties:
|
||||
result:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../schemas/Notification.yaml'
|
@ -1,20 +1,16 @@
|
||||
type: object
|
||||
properties:
|
||||
alertchanel:
|
||||
channel:
|
||||
type: string
|
||||
createdAt:
|
||||
type: string
|
||||
format: date-time
|
||||
frequency:
|
||||
type: string
|
||||
groupbyparams:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
period:
|
||||
type: string
|
||||
queryText:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
enum:
|
||||
@ -23,9 +19,7 @@ properties:
|
||||
- ARCHIVE
|
||||
subject:
|
||||
type: string
|
||||
templateType:
|
||||
type: string
|
||||
templateValue:
|
||||
type:
|
||||
type: string
|
||||
updatedAt:
|
||||
type: string
|
||||
|
4
openapi/components/schemas/NotificationName.yaml
Normal file
4
openapi/components/schemas/NotificationName.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
description: Название нотификации
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 40
|
8
openapi/components/schemas/NotificationStatus.yaml
Normal file
8
openapi/components/schemas/NotificationStatus.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
enum:
|
||||
- CREATED
|
||||
- ACTIVE
|
||||
- ARCHIVE
|
@ -48,13 +48,15 @@ paths:
|
||||
|
||||
# Notifications
|
||||
/notifications:
|
||||
$ref: ./paths/notifications/createOrUpdateNotification.yaml
|
||||
$ref: ./paths/notifications/notifications.yaml
|
||||
/notifications/{name}:
|
||||
$ref: ./paths/notifications/removeNotification.yaml
|
||||
/notifications/validate:
|
||||
$ref: ./paths/notifications/validateNotification.yaml
|
||||
$ref: ./paths/notifications/notification.yaml
|
||||
/notifications/validating:
|
||||
$ref: ./paths/notifications/validating.yaml
|
||||
/notifications/{name}/statuses:
|
||||
$ref: ./paths/notifications/statuses.yaml
|
||||
|
||||
# Notifications channel
|
||||
# Notifications channels
|
||||
/notifications/channels:
|
||||
$ref: ./paths/notifications/channels.yaml
|
||||
/notifications/channels/{name}:
|
||||
|
@ -12,7 +12,7 @@ delete:
|
||||
|
||||
responses:
|
||||
'204':
|
||||
description: Notofication was removed
|
||||
description: Channel was removed
|
||||
'401':
|
||||
description: Unauthorized
|
||||
'403':
|
||||
|
@ -4,17 +4,10 @@ delete:
|
||||
tags:
|
||||
- notification
|
||||
parameters:
|
||||
- name: name
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
|
||||
- $ref: '../../components/parameters/notificationName.yaml'
|
||||
responses:
|
||||
'200':
|
||||
description: Removed notification
|
||||
'204':
|
||||
description: No Content
|
||||
description: Notification was removed
|
||||
'401':
|
||||
description: Unauthorized
|
||||
'403':
|
@ -1,3 +1,25 @@
|
||||
get:
|
||||
summary: Получение списка нотификаций
|
||||
operationId: getNotifications
|
||||
tags:
|
||||
- notification
|
||||
|
||||
responses:
|
||||
'200':
|
||||
description: Notifications list
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../components/responses/NotificationListResponse.yaml'
|
||||
|
||||
'401':
|
||||
description: Unauthorized
|
||||
'403':
|
||||
description: Forbidden
|
||||
'404':
|
||||
description: Not Found
|
||||
|
||||
|
||||
post:
|
||||
summary: Создание нотификации
|
||||
operationId: createOrUpdateNotification
|
||||
@ -12,7 +34,7 @@ post:
|
||||
|
||||
responses:
|
||||
'201':
|
||||
description: Created row in list
|
||||
description: Created notification
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
29
openapi/paths/notifications/statuses.yaml
Normal file
29
openapi/paths/notifications/statuses.yaml
Normal file
@ -0,0 +1,29 @@
|
||||
patch:
|
||||
summary: Изменение статуса нотификации
|
||||
operationId: updateNotificationStatus
|
||||
tags:
|
||||
- notification
|
||||
parameters:
|
||||
- $ref: '../../components/parameters/notificationName.yaml'
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../components/schemas/NotificationStatus.yaml'
|
||||
|
||||
responses:
|
||||
'201':
|
||||
description: Updated status
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../components/schemas/NotificationStatus.yaml'
|
||||
|
||||
'401':
|
||||
description: Unauthorized
|
||||
'403':
|
||||
description: Forbidden
|
||||
'404':
|
||||
description: Not Found
|
||||
|
||||
|
@ -12,7 +12,7 @@ post:
|
||||
|
||||
responses:
|
||||
'201':
|
||||
description: Created row in list
|
||||
description: Validation result
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
Loading…
Reference in New Issue
Block a user