Add methods for data sets

This commit is contained in:
k.struzhkin 2021-08-11 11:58:40 +03:00
parent 4d5c658559
commit ff8c606573
12 changed files with 220 additions and 0 deletions

View File

@ -0,0 +1,16 @@
type: object
required:
- records
- template
properties:
records:
type: array
items:
$ref: '../schemas/Payment.yaml'
template:
type: string
reference:
$ref: '../schemas/PaymentReference.yaml'
ruleSetTimestamp:
type: string
format: date-time

View File

@ -0,0 +1,10 @@
type: object
required:
- result
properties:
continuationId:
type: string
result:
type: array
items:
$ref: '../schemas/DataSet.yaml'

View File

@ -0,0 +1,11 @@
type: object
properties:
rows:
type: array
items:
$ref: './DataSetRow.yaml'
lastModificationAt:
type: string
format: date-time
lastModificationInitiator:
type: string

View File

@ -0,0 +1,8 @@
type: object
properties:
payment:
$ref: './Payment.yaml'
runtimeResult:
$ref: './RuleApplyResult.yaml'
templateEmulationResult:
$ref: './TemplateEmulationResult.yaml'

View File

@ -0,0 +1,12 @@
type: object
properties:
checkedTemplate:
type: string
resultStatus:
type: string
ruleChecked:
type: string
notificationsRule:
type: array
items:
type: string

View File

@ -0,0 +1,6 @@
type: object
properties:
emulateResult:
$ref: './RuleApplyResult.yaml'
template:
type: string

View File

@ -138,6 +138,18 @@ paths:
/payments-historical-data/refunds:
$ref: ./paths/payments/historical-data/filterRefunds.yaml
# Data sets
/payments-data-set/data-sets:
$ref: ./paths/payments/data-sets/insertDataSet.yaml
/payments-data-set/data-sets/{id}:
$ref: ./paths/payments/data-sets/removeDataSet.yaml
/payments-data-set/data-sets/filter:
$ref: ./paths/payments/data-sets/filterDataSets.yaml
/payments-data-set/data-sets/applyRuleOnHistoricalDataSet:
$ref: ./paths/payments/data-sets/applyRuleOnHistoricalDataSet.yaml
/payments-data-set/data-sets/{setId}:
$ref: ./paths/payments/data-sets/getDataSet.yaml
servers:
- url: 'https://fb-management:8080/fb-management/v1'

View File

@ -0,0 +1,27 @@
post:
summary: Эмуляция работы темплейта на тестовом наборе данных
operationId: applyRuleOnHistoricalDataSet
tags:
- data-sets
requestBody:
content:
application/json:
schema:
$ref: '../../../components/requests/ApplyRuleOnHistoricalDataSetRequest.yaml'
responses:
'201':
description: Created data set
content:
application/json:
schema:
type: string
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found

View File

@ -0,0 +1,37 @@
get:
summary: Поиск наборов данных
operationId: filterDataSets
tags:
- data-sets
parameters:
- name: from
required: false
in: query
schema:
type: string
- name: to
required: false
in: query
schema:
type: string
- name: dataSetName
required: false
in: query
schema:
type: string
responses:
'201':
description: Data sets
content:
application/json:
schema:
$ref: '../../../components/responses/DataSetsResponse.yaml'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found

View File

@ -0,0 +1,27 @@
get:
summary: Получить конкретный набор данных
operationId: getDataSet
tags:
- data-sets
parameters:
- name: setId
required: true
in: path
schema:
type: string
responses:
'201':
description: Data set
content:
application/json:
schema:
$ref: '../../../components/schemas/DataSet.yaml'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found

View File

@ -0,0 +1,27 @@
post:
summary: Создание нового тестового набора платежей
operationId: insertDataSet
tags:
- data-sets
requestBody:
content:
application/json:
schema:
$ref: '../../../components/schemas/DataSet.yaml'
responses:
'201':
description: Created data set
content:
application/json:
schema:
type: string
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found

View File

@ -0,0 +1,27 @@
delete:
summary: Удаление тестового набора данных
operationId: removeDataSet
tags:
- data-sets
parameters:
- name: id
required: true
in: path
schema:
type: string
responses:
'201':
description: Removed data set
content:
application/json:
schema:
type: string
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found