-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathepf-endpoint.yaml
284 lines (284 loc) · 9.21 KB
/
epf-endpoint.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
openapi: 3.0.3
info:
title: Внешние обработки (endpoint)
description: Управление внешними отчетами и обработками через HTTP сервис (REST).
contact:
email: a.strizhachuk@yandex.ru
version: 2.3.0
servers:
- url: http://localhost/test/hs
description: develop
security:
- basic_auth: []
paths:
/infobase:
get:
summary: Сведения об информационной базе
operationId: infobase
responses:
'200':
description: Текущие сведения
content:
application/json:
schema:
type: object
properties:
config_version:
type: string
connection_string:
type: string
examples:
info:
summary: Текущие сведения
value:
config_version: 1.0.0
connection_string: File="/1c/db/epf-endpoint";
/epf/status:
get:
tags:
- epf
summary: Текущий статус функционала загрузки файлов
description: Показывает текущий статус функционала загрузки файлов внешних обработок
operationId: status
responses:
'200':
description: Текущий статус загрузки
content:
application/json:
schema:
$ref: '#/components/schemas/message'
examples:
enabled:
summary: Включено
value:
message: загрузка файлов включена
disabled:
summary: Отключено
value:
message: загрузка файлов отключена
/epf/{guid}:
get:
tags:
- epf
summary: Найти внешнюю обработку по GUID
description: >-
Найти и вывести информацию о месте хранения файлов внешней обработки по
его GUID
operationId: findByGuid
parameters:
- name: guid
in: path
description: >-
GUID элемента, в котором хранится файл внешней обработки с его
описанием
required: true
schema:
type: string
format: uuid
responses:
'200':
description: Результат успешного поиска
content:
application/json:
schema:
$ref: '#/components/schemas/details'
'404':
description: Не найдено
content: {}
'500':
description: Ошибка сервера
content:
text/plain:
schema:
type: string
examples:
bad GUID:
summary: Плохой GUID
value: >-
{HTTPСервис.ExternalDataProcessors.Модуль(10)}: Ошибка при
вызове конструктора (УникальныйИдентификатор)
/epf/findByFilename:
get:
tags:
- epf
summary: Найти внешние обработки по имени файла
description: >-
Найти и отобразить все места хранения файла внешних обработок по его
полному имени
operationId: findByFilename
parameters:
- name: query
in: query
description: Полное имя файла (с расширением) для поиска
required: true
schema:
type: string
responses:
'200':
description: Результат успешного поиска
content:
application/json:
schema:
type: array
items:
oneOf:
- $ref: '#/components/schemas/file_attribute'
- $ref: '#/components/schemas/file_table'
'400':
description: Ошибочный запрос
content: {}
'404':
description: Не найдено
content: {}
/epf/switch:
post:
tags:
- epf
summary: Управление загрузкой файлов
description: Управление функционалом загрузки файлов внешних обработок
operationId: switch
parameters:
- name: value
in: header
description: on - включить, off - отключить
required: true
schema:
type: string
enum:
- 'on'
- 'off'
requestBody:
content: {}
required: false
responses:
'200':
description: Результат операции
content:
application/json:
schema:
$ref: '#/components/schemas/message'
examples:
enabled:
summary: Включено
value:
message: загрузка файлов включена
disabled:
summary: Отключено
value:
message: загрузка файлов отключена
'400':
description: Ошибочный запрос
content: {}
/epf/uploadFile:
post:
tags:
- epf
summary: Загрузить внешнюю обработку
operationId: uploadFile
parameters:
- name: name
in: header
description: Полное имя файла (с расширением)
required: true
schema:
type: string
requestBody:
description: Внешний отчет или обработка в двоичном формате
content:
application/x-www-form-urlencoded:
schema:
type: string
format: binary
required: true
responses:
'200':
description: Результат загрузки файла
content:
application/json:
schema:
type: object
properties:
uploaded:
type: array
items:
oneOf:
- $ref: '#/components/schemas/file_attribute'
- $ref: '#/components/schemas/file_table'
errors:
type: array
items:
type: object
properties:
message:
type: string
example: >-
{Справочник.ВнешниеОбработки.МодульМенеджера(109)}:
Индекс находится за границами массива
error:
oneOf:
- $ref: '#/components/schemas/file_attribute'
- $ref: '#/components/schemas/file_table'
'400':
description: Ошибочный запрос
content: {}
'404':
description: Не найдено куда загружать
content: {}
'423':
description: Функционал отключен
content: {}
components:
schemas:
message:
type: object
properties:
message:
type: string
details:
type: object
properties:
guid:
type: string
format: uuid
filename:
type: string
example: ЭтоОбработка1.epf
comment:
type: string
example: 'Размер: такой-то... для ЭтоОбработка1.epf'
tables:
type: array
items:
$ref: '#/components/schemas/file_table'
file_attribute:
properties:
guid:
type: string
format: uuid
filename:
type: string
example: ЭтоОбработка2.epf
comment:
type: string
example: 'Размер: такой-то... для ЭтоОбработка2.epf'
file_table:
properties:
guid:
type: string
format: uuid
table:
type: string
example: Принадлежность
line:
type: integer
example: 1
filename:
type: string
example: ЭтоОбработка2.epf
comment:
type: string
example: 'Размер: такой-то... для ЭтоОбработка2.epf'
securitySchemes:
basic_auth:
type: http
scheme: basic