Skip to content

Commit 9f54f1b

Browse files
committed
adding files for REST schemas
1 parent ecc960a commit 9f54f1b

18 files changed

Lines changed: 62680 additions & 0 deletions

openapi-swagger/catwatch.json

Lines changed: 1641 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 396 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,396 @@
1+
{
2+
"openapi": "3.0.1",
3+
"info": {
4+
"title": "cwa-verification-server",
5+
"license": {
6+
"name": "Apache 2.0",
7+
"url": "http://www.apache.org/licenses/LICENSE-2.0"
8+
},
9+
"version": "1.2.0-SNAPSHOT"
10+
},
11+
"servers": [
12+
{
13+
"url": "http://localhost:8080",
14+
"description": "Generated server url"
15+
}
16+
],
17+
"paths": {
18+
"/version/v1/tan": {
19+
"post": {
20+
"tags": [
21+
"external-tan-controller"
22+
],
23+
"summary": "Generates a Tan",
24+
"description": "Generates a TAN on input of Registration Token. With the TAN one can submit his Diagnosis keys",
25+
"operationId": "generateTan",
26+
"parameters": [
27+
{
28+
"name": "cwa-fake",
29+
"in": "header",
30+
"required": false,
31+
"schema": {
32+
"type": "string"
33+
}
34+
}
35+
],
36+
"requestBody": {
37+
"content": {
38+
"application/json": {
39+
"schema": {
40+
"$ref": "#/components/schemas/RegistrationToken"
41+
}
42+
}
43+
},
44+
"required": true
45+
},
46+
"responses": {
47+
"201": {
48+
"description": "Registration Token is valid",
49+
"content": {
50+
"application/json": {
51+
"schema": {
52+
"$ref": "#/components/schemas/DeferredResultResponseEntityTan"
53+
}
54+
}
55+
}
56+
},
57+
"400": {
58+
"description": "Registration Token does not exist"
59+
},
60+
"500": {
61+
"description": "Internal Server Error"
62+
}
63+
}
64+
}
65+
},
66+
"/version/v1/testresult": {
67+
"post": {
68+
"tags": [
69+
"external-test-state-controller"
70+
],
71+
"summary": "COVID-19 test result for given RegistrationToken",
72+
"description": "Gets the result of COVID-19 Test. If the RegistrationToken belongs to a TeleTan the result is always positive",
73+
"operationId": "getTestState",
74+
"parameters": [
75+
{
76+
"name": "cwa-fake",
77+
"in": "header",
78+
"required": false,
79+
"schema": {
80+
"type": "string"
81+
}
82+
}
83+
],
84+
"requestBody": {
85+
"content": {
86+
"application/json": {
87+
"schema": {
88+
"$ref": "#/components/schemas/RegistrationToken"
89+
}
90+
}
91+
},
92+
"required": true
93+
},
94+
"responses": {
95+
"200": {
96+
"description": "Testresult retrieved",
97+
"content": {
98+
"application/json": {
99+
"schema": {
100+
"$ref": "#/components/schemas/DeferredResultResponseEntityTestResult"
101+
}
102+
}
103+
}
104+
},
105+
"400": {
106+
"description": "Bad Request"
107+
},
108+
"500": {
109+
"description": "Internal Server Error"
110+
}
111+
}
112+
}
113+
},
114+
"/version/v1/registrationToken": {
115+
"post": {
116+
"tags": [
117+
"external-token-controller"
118+
],
119+
"summary": "Get registration Token",
120+
"description": "Get a registration token by providing a SHA-256 hasehd GUID or a teleTAN",
121+
"operationId": "generateRegistrationToken",
122+
"parameters": [
123+
{
124+
"name": "cwa-fake",
125+
"in": "header",
126+
"required": false,
127+
"schema": {
128+
"type": "string"
129+
}
130+
}
131+
],
132+
"requestBody": {
133+
"content": {
134+
"application/json": {
135+
"schema": {
136+
"$ref": "#/components/schemas/RegistrationTokenRequest"
137+
}
138+
}
139+
},
140+
"required": true
141+
},
142+
"responses": {
143+
"201": {
144+
"description": "registration token generated.",
145+
"content": {
146+
"application/json": {
147+
"schema": {
148+
"$ref": "#/components/schemas/DeferredResultResponseEntityRegistrationToken"
149+
}
150+
}
151+
}
152+
},
153+
"400": {
154+
"description": "GUID/TeleTAN already exists."
155+
},
156+
"500": {
157+
"description": "Internal Server Error"
158+
}
159+
}
160+
}
161+
},
162+
"/version/v1/tan/teletan": {
163+
"post": {
164+
"tags": [
165+
"internal-tan-controller"
166+
],
167+
"summary": "Request generation of a teleTAN",
168+
"description": "A teleTAN is a human readable TAN with 7 characters which is supposed to be issued via call line",
169+
"operationId": "createTeleTan",
170+
"parameters": [
171+
{
172+
"name": "Authorization",
173+
"in": "header",
174+
"required": true,
175+
"schema": {
176+
"$ref": "#/components/schemas/AuthorizationToken"
177+
}
178+
}
179+
],
180+
"responses": {
181+
"201": {
182+
"description": "TeleTan created",
183+
"content": {
184+
"application/json": {
185+
"schema": {
186+
"$ref": "#/components/schemas/TeleTan"
187+
}
188+
}
189+
}
190+
},
191+
"400": {
192+
"description": "Bad Request"
193+
},
194+
"500": {
195+
"description": "Internal Server Error"
196+
}
197+
}
198+
}
199+
},
200+
"/version/v1/tan/verify": {
201+
"post": {
202+
"tags": [
203+
"internal-tan-controller"
204+
],
205+
"summary": "Verify provided Tan",
206+
"description": "The provided Tan is verified to be formerly issued by the verification server",
207+
"operationId": "verifyTan",
208+
"requestBody": {
209+
"content": {
210+
"application/json": {
211+
"schema": {
212+
"$ref": "#/components/schemas/Tan"
213+
}
214+
}
215+
},
216+
"required": true
217+
},
218+
"responses": {
219+
"200": {
220+
"description": "Tan is valid an formerly issued by the verification server",
221+
"content": {
222+
"*/*": {
223+
"schema": {
224+
"type": "object"
225+
}
226+
}
227+
}
228+
},
229+
"400": {
230+
"description": "Bad Request"
231+
},
232+
"404": {
233+
"description": "Tan could not be verified",
234+
"content": {
235+
"*/*": {
236+
"schema": {
237+
"type": "object"
238+
}
239+
}
240+
}
241+
},
242+
"500": {
243+
"description": "Internal Server Error"
244+
}
245+
}
246+
}
247+
}
248+
},
249+
"components": {
250+
"schemas": {
251+
"RegistrationToken": {
252+
"required": [
253+
"registrationToken"
254+
],
255+
"type": "object",
256+
"properties": {
257+
"registrationToken": {
258+
"pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$",
259+
"type": "string"
260+
},
261+
"responsePadding": {
262+
"type": "string"
263+
}
264+
},
265+
"description": "The registration token model."
266+
},
267+
"DeferredResultHandler": {
268+
"type": "object"
269+
},
270+
"DeferredResultResponseEntityTan": {
271+
"type": "object",
272+
"properties": {
273+
"resultHandler": {
274+
"$ref": "#/components/schemas/DeferredResultHandler"
275+
},
276+
"result": {
277+
"type": "object"
278+
},
279+
"resultInternal": {
280+
"type": "boolean",
281+
"writeOnly": true
282+
},
283+
"setOrExpired": {
284+
"type": "boolean"
285+
},
286+
"errorResult": {
287+
"type": "boolean",
288+
"writeOnly": true
289+
}
290+
}
291+
},
292+
"DeferredResultResponseEntityTestResult": {
293+
"type": "object",
294+
"properties": {
295+
"resultHandler": {
296+
"$ref": "#/components/schemas/DeferredResultHandler"
297+
},
298+
"result": {
299+
"type": "object"
300+
},
301+
"resultInternal": {
302+
"type": "boolean",
303+
"writeOnly": true
304+
},
305+
"setOrExpired": {
306+
"type": "boolean"
307+
},
308+
"errorResult": {
309+
"type": "boolean",
310+
"writeOnly": true
311+
}
312+
}
313+
},
314+
"RegistrationTokenRequest": {
315+
"type": "object",
316+
"properties": {
317+
"key": {
318+
"type": "string"
319+
},
320+
"keyDob": {
321+
"type": "string",
322+
"required": false,
323+
"description": "Only used in conjunction with keyType == GUID. The hashed GUID consists of concat('x', substring(sha256_hex(concat(test-id-uuid, DateOfBirth.format(DDMMYYYY))), 1) - e.g. concat('x', substring(sha256_hex('7bb41672-7de4-44c3-b751-4258e59f3e2508051992')), 1)) --> x3712193bd35d40f03ee497ea7e4ea8278d8fcc8a2287843bb0ab36939d222b4"
324+
},
325+
"keyType": {
326+
"type": "string",
327+
"enum": [
328+
"GUID",
329+
"TELETAN"
330+
]
331+
}
332+
},
333+
"description": "The registration token request model."
334+
},
335+
"DeferredResultResponseEntityRegistrationToken": {
336+
"type": "object",
337+
"properties": {
338+
"resultHandler": {
339+
"$ref": "#/components/schemas/DeferredResultHandler"
340+
},
341+
"result": {
342+
"type": "object"
343+
},
344+
"resultInternal": {
345+
"type": "boolean",
346+
"writeOnly": true
347+
},
348+
"setOrExpired": {
349+
"type": "boolean"
350+
},
351+
"errorResult": {
352+
"type": "boolean",
353+
"writeOnly": true
354+
}
355+
}
356+
},
357+
"AuthorizationToken": {
358+
"required": [
359+
"token"
360+
],
361+
"type": "object",
362+
"properties": {
363+
"token": {
364+
"type": "string"
365+
}
366+
},
367+
"description": "The bearer jwt token header model."
368+
},
369+
"TeleTan": {
370+
"type": "object",
371+
"properties": {
372+
"value": {
373+
"type": "string"
374+
}
375+
},
376+
"description": "The teleTAN model."
377+
},
378+
"Tan": {
379+
"required": [
380+
"tan"
381+
],
382+
"type": "object",
383+
"properties": {
384+
"tan": {
385+
"pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$",
386+
"type": "string"
387+
},
388+
"responsePadding": {
389+
"type": "string"
390+
}
391+
},
392+
"description": "The transaction number model."
393+
}
394+
}
395+
}
396+
}

0 commit comments

Comments
 (0)