-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathswagger.yml
159 lines (147 loc) · 3.66 KB
/
swagger.yml
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
openapi: 3.0.0
info:
title: Upload API
description: Document Upload Api version 2
version: 0.0.1
servers:
- url: https://api-mtp.europace2.de
description: mtp
- url: https://api.europace2.de
description: prod
security:
- BearerAuth:
[]
paths:
/v2/dokumente:
post:
tags:
- Document Upload
summary: Upload a document
operationId: upload
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UploadRequestViaUrl'
multipart/form-data:
schema:
$ref: '#/components/schemas/UploadRequestViaFile'
responses:
"202":
description: document accepted
content:
application/json:
schema:
$ref: '#/components/schemas/UploadResponse'
"400":
description: bad request
content:
application/json:
schema:
type: object
properties:
timestamp:
example: 2023-07-12T12:07:07.400+00:00
type: string
message:
example: Required parameter 'caseId' is not present.
type: string
"403":
description: forbidden
content:
application/json:
schema:
type: object
properties:
timestamp:
example: 2023-07-12T12:07:07.400+00:00
type: string
message:
example: User is not authorized to access this resource with an explicit deny
type: string
components:
responses:
NotFound:
description: case id not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
BadRequest:
description: bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Forbidden:
description: forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
securitySchemes:
BearerAuth:
type: http
scheme: bearer
schemas:
UploadRequestViaFile:
type: object
properties:
file:
description: content of file
type: string
format: binary
caseId:
description: case id where the document is to add
type: string
displayName:
description: name to display on frontend
type: string
category:
description: manual assigned category
type: string
required:
- file
- caseId
UploadRequestViaUrl:
type: object
properties:
caseId:
type: string
example: A23WYC
url:
type: string
example: https://picsum.photos/595/842
displayName:
type: string
example: Mustermann ID
category:
type: string
description: if empty triggers the auto categorization
example: Ausweis
required:
- caseId
- url
UploadResponse:
type: object
properties:
id:
example: 64ae9d0199c39b04e37f1816
type: string
Metadata:
type: object
properties:
displayName:
type: string
category:
type: string
Error:
type: object
properties:
timestamp:
type: string
message:
type: string
required:
- timestamp
- message