-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathR001_allegato.yaml
264 lines (261 loc) · 8.37 KB
/
R001_allegato.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
openapi: 3.0.0
info:
title: Servizio di gestione file allegati
version: '1.4.0'
servers:
- url: https://anscservice.anpr.interno.it/services/service/doc
description: Servizio di produzione
- url: https://anscservicepre.anpr.interno.it/services/service/doc
description: Servizio di preproduzione
- url: http://localhost:8081
description: Servizio mock locale
paths:
/allegato/upload/{version}:
post:
description: Caricamento del file allegato
parameters:
- name: version
in: path
required: true
description: Versione del servizio
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AllegatoUploadRequest'
responses:
200:
description: Successo
content:
application/json:
schema:
$ref: '#/components/schemas/AllegatoUploadResponse'
403:
description: Non autorizzato
content:
application/json:
schema:
$ref: '#/components/schemas/AllegatoUploadResponse'
400:
description: Se non arriva un file valido (deve essere diverso da null)
content:
application/json:
schema:
$ref: '#/components/schemas/AllegatoUploadResponse'
413:
description: La dimensione del file supera i limiti del sistema
content:
application/json:
schema:
$ref: '#/components/schemas/AllegatoUploadResponse'
/allegato/{version}:
post:
description: Recupera tutti i dati del file allegato, compreso il contenuto
parameters:
- name: version
in: path
required: true
description: Versione del servizio
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AllegatoRequest'
responses:
200:
description: Successo
content:
application/json:
schema:
$ref: '#/components/schemas/AllegatoResponse'
403:
description: Non autorizzato
content:
application/json:
schema:
$ref: '#/components/schemas/AllegatoResponse'
404:
description: Non trovato
content:
application/json:
schema:
$ref: '#/components/schemas/AllegatoResponse'
/allegato/verifica/{version}:
post:
description: Servizio leggero per ottenere lo stato corrente dell'allegato
parameters:
- name: version
in: path
required: true
description: Versione del servizio
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AllegatoVerificaRequest'
responses:
200:
description: Successo
content:
application/json:
schema:
$ref: '#/components/schemas/AllegatoVerificaResponse'
403:
description: Non autorizzato
content:
application/json:
schema:
$ref: '#/components/schemas/AllegatoVerificaResponse'
404:
description: Non trovato
content:
application/json:
schema:
$ref: '#/components/schemas/AllegatoVerificaResponse'
components:
schemas:
AllegatoInput:
description: Modello allegato per l'upload
required:
- contenuto
- nomefile
- tipoFile
- tipoAllegato
properties:
contenuto:
type: string
format: base64
description: Il file in formato base64
example: "QU5TQw=="
nomefile:
type: string
description: Nome del file
example: "nome_del_file.pdf"
minLength: 1
maxLength: 200
pattern: '^[- _a-zA-Z0-9_]*$'
tipoFile:
type: string
description: Tipo del file (codificato ANSC_10)
example: "1"
tipoAllegato:
type: string
description: Tipo dell'allegato (codificato ANSC_9)
example: "1"
descrizione:
description: Descrizione assegnata ad Allegato per caso d'uso libero
type: string
example: Attestazione di nascita
AllegatoOutput:
description: Modello allegato restituito dal sistema
properties:
idAllegato:
type: string
description: Id del file assegnato dal sistema
example: "43676"
statoAllegato:
type: string
description: Stato corrente dell'allegato (codificato ANSC_8)
example: "1"
contenuto:
type: string
format: base64
description: Il file in formato base64
example: "QU5TQw=="
idDocumentum:
type: string
description: ID Documentum assegnato al file
example: "26115"
nomefile:
type: string
description: Nome del file
example: "nome_del_file.pdf"
tipoFile:
type: string
description: Tipo del file (codificato ANSC_10)
example: "1"
tipoAllegato:
type: string
description: Tipo dell'allegato (codificato ANSC_9)
example: "1"
hash:
description: "Hash del file calcolato dal sistema (nota: definire l'algoritmo, per es: SHA1)"
type: string
example: "21d305c42509"
codice:
type: string
description: codice
example: "200"
descrizione:
type: string
description: descrizione del codice
example: "SUCCESS"
tipologia:
type: string
description: errore del servizio
example: "errore"
AllegatoUploadRequest:
description: Dati dell'allegato inviato
allOf:
- $ref: 'https://italia.github.io/ansc/docs/openapi/base_servizi.yaml#/components/schemas/AnscRequest'
- type: object
required:
- allegatoInput
properties:
allegatoInput:
$ref: '#/components/schemas/AllegatoInput'
AllegatoUploadResponse:
description: Dati dell'allegato restituito dal servizio
allOf:
- $ref: 'https://italia.github.io/ansc/docs/openapi/base_servizi.yaml#/components/schemas/AnscResponse'
- type: object
properties:
allegatoOutput:
$ref: '#/components/schemas/AllegatoOutput'
AllegatoRequest:
description: Dati dell'allegato inviato
allOf:
- $ref: 'https://italia.github.io/ansc/docs/openapi/base_servizi.yaml#/components/schemas/AnscRequest'
- type: object
properties:
idAllegato:
type: string
description: Id del file assegnato dal sistema
example: "43676"
AllegatoResponse:
description: Dati dell'allegato restituito dal servizio
allOf:
- $ref: 'https://italia.github.io/ansc/docs/openapi/base_servizi.yaml#/components/schemas/AnscResponse'
- type: object
properties:
allegatoOutput:
$ref: '#/components/schemas/AllegatoOutput'
AllegatoVerificaRequest:
description: Dati dell'allegato inviato
allOf:
- $ref: 'https://italia.github.io/ansc/docs/openapi/base_servizi.yaml#/components/schemas/AnscRequest'
- type: object
required:
- idAllegato
properties:
idAllegato:
type: string
description: Id del file assegnato dal sistema
example: "43676"
AllegatoVerificaResponse:
description: Dati dell'allegato restituito dal servizio
allOf:
- $ref: 'https://italia.github.io/ansc/docs/openapi/base_servizi.yaml#/components/schemas/AnscResponse'
- type: object
properties:
allegatoOutput:
$ref: '#/components/schemas/AllegatoOutput'