refactoring channels

This commit is contained in:
ggmaleva 2021-08-17 14:40:17 +03:00
parent 97bc45b21a
commit 5141b2137f
No known key found for this signature in database
GPG Key ID: 0E412B78565B108F
6 changed files with 60 additions and 34 deletions

View File

@ -5,7 +5,7 @@ UTILS_PATH := build_utils
TEMPLATES_PATH := .
# Name of the service
SERVICE_NAME := swag-analytics
SERVICE_NAME := swag-fraudbusters-management
# Service image default tag
SERVICE_IMAGE_TAG ?= $(shell git rev-parse HEAD)
# The tag for service image to be pushed with

View File

@ -0,0 +1,6 @@
type: object
required:
- result
properties:
result:
$ref: '../schemas/Channel.yaml'

View File

@ -19,6 +19,8 @@ tags:
x-displayName: Audit
- name: notification
x-displayName: Notifications
- name: channel
x-displayName: Channels
- name: group
x-displayName: Groups
- name: group-reference
@ -54,9 +56,9 @@ paths:
# Notifications channel
/notifications/channels:
$ref: ./paths/notifications/channels/createChannel.yaml
$ref: ./paths/notifications/channels.yaml
/notifications/channels/{name}:
$ref: ./paths/notifications/channels/removeChannel.yaml
$ref: ./paths/notifications/channel.yaml
# Load data
/payments-load-data/fraud-payments:

View File

@ -2,7 +2,7 @@ delete:
summary: Удалить канал для нотификации
operationId: removeChannel
tags:
- notification
- channel
parameters:
- name: name
in: path
@ -11,10 +11,8 @@ delete:
type: string
responses:
'200':
description: Removed notification
'204':
description: No Content
description: Notofication was removed
'401':
description: Unauthorized
'403':

View File

@ -0,0 +1,47 @@
get:
summary: Получение списка каналов для нотификаций
operationId: getChannels
tags:
- channel
responses:
'200':
description: Channels list
content:
application/json:
schema:
$ref: '../../components/responses/ChannelListResponse.yaml'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
post:
summary: Создание канала для нотификаций
operationId: createChannel
tags:
- channel
requestBody:
content:
application/json:
schema:
$ref: '../../components/schemas/Channel.yaml'
responses:
'201':
description: Created channel
content:
application/json:
schema:
$ref: '../../components/schemas/Channel.yaml'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found

View File

@ -1,27 +0,0 @@
post:
summary: Создание канала для нотификаций
operationId: createChannel
tags:
- notification
requestBody:
content:
application/json:
schema:
$ref: '../../../components/schemas/Channel.yaml'
responses:
'201':
description: Created row in list
content:
application/json:
schema:
$ref: '../../../components/schemas/Channel.yaml'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found