8
8
paths :
9
9
/api/v2/info :
10
10
post :
11
- description : " "
11
+ operationId : postHentInfoV2
12
+ description : " Hent info"
12
13
parameters :
13
14
- name : " traceparent"
14
15
in : " header"
@@ -17,44 +18,49 @@ paths:
17
18
type : " string"
18
19
requestBody :
19
20
content :
20
- ' */* ' :
21
+ application/json :
21
22
schema :
22
23
$ref : " #/components/schemas/RequestV2"
23
24
required : true
24
25
responses :
26
+ " 200 " :
27
+ description : " OK"
28
+ content :
29
+ application/json :
30
+ schema :
31
+ $ref : " #/components/schemas/InfoResponse"
25
32
" 400 " :
26
33
description : " Bad Request"
27
34
content :
28
- text/plain :
35
+ application/json :
29
36
schema :
30
- type : " string"
31
- examples :
32
- Example#1:
33
- value : " Bad request"
37
+ $ref : " #/components/schemas/ProblemDetails"
38
+ example :
39
+ id : " 3cd944fb-6187-41a8-91b2-b172f2baf890"
40
+ type : " urn:paw:http:kunne-ikke-tolke-forespoersel"
41
+ status : 400
42
+ title : " Bad Request"
43
+ detail : " Kunne ikke tolke forespørsel"
44
+ instance : " /api/v2/info"
45
+ timestamp : " 2021-01-01T12:00:00.000Z"
34
46
" 500 " :
35
47
description : " Internal Server Error"
36
48
content :
37
- text/plain :
49
+ application/json :
38
50
schema :
39
- type : " string"
40
- examples :
41
- Example#1:
42
- value : " En uventet feil oppstod"
43
- " 200 " :
44
- description : " "
45
- content :
46
- text/plain :
47
- schema :
48
- type : " string"
49
- examples :
50
- Example#1:
51
- value : " Intern feil, prøv igjen senere"
52
- ' */* ' :
53
- schema :
54
- $ref : " #/components/schemas/InfoResponse"
51
+ $ref : " #/components/schemas/ProblemDetails"
52
+ example :
53
+ id : " 3cd944fb-6187-41a8-91b2-b172f2baf890"
54
+ type : " urn:paw:default:ukjent-feil"
55
+ status : 500
56
+ title : " Internal Server Error"
57
+ detail : " Ukjent feil"
58
+ instance : " /api/v2/info"
59
+ timestamp : " 2021-01-01T12:00:00.000Z"
55
60
/api/v2/hentEllerOpprett :
56
61
post :
57
- description : " "
62
+ operationId : postHentEllerOpprettKeyV2
63
+ description : " Hent eller opprett Kafka keys"
58
64
parameters :
59
65
- name : " traceparent"
60
66
in : " header"
@@ -63,41 +69,90 @@ paths:
63
69
type : " string"
64
70
requestBody :
65
71
content :
66
- ' */* ' :
72
+ application/json :
67
73
schema :
68
74
$ref : " #/components/schemas/RequestV2"
69
75
required : true
70
76
responses :
77
+ " 200 " :
78
+ description : " OK"
79
+ content :
80
+ application/json :
81
+ schema :
82
+ $ref : " #/components/schemas/ResponseV2"
71
83
" 400 " :
72
84
description : " Bad Request"
73
85
content :
74
- text/plain :
86
+ application/json :
75
87
schema :
76
- type : " string"
77
- examples :
78
- Example#1:
79
- value : " Bad request"
88
+ $ref : " #/components/schemas/ProblemDetails"
89
+ example :
90
+ id : " 3cd944fb-6187-41a8-91b2-b172f2baf890"
91
+ type : " urn:paw:http:kunne-ikke-tolke-forespoersel"
92
+ status : 400
93
+ title : " Bad Request"
94
+ detail : " Kunne ikke tolke forespørsel"
95
+ instance : " /api/v2/hentEllerOpprett"
96
+ timestamp : " 2021-01-01T12:00:00.000Z"
80
97
" 500 " :
81
98
description : " Internal Server Error"
99
+ content :
100
+ application/json :
101
+ schema :
102
+ $ref : " #/components/schemas/ProblemDetails"
103
+ example :
104
+ id : " 3cd944fb-6187-41a8-91b2-b172f2baf890"
105
+ type : " urn:paw:default:ukjent-feil"
106
+ status : 500
107
+ title : " Internal Server Error"
108
+ detail : " Ukjent feil"
109
+ instance : " /api/v2/hentEllerOpprett"
110
+ timestamp : " 2021-01-01T12:00:00.000Z"
111
+ /internal/isAlive :
112
+ get :
113
+ operationId : getIsAlive
114
+ description : " Service is alive probe"
115
+ responses :
116
+ " 200 " :
117
+ description : " OK"
82
118
content :
83
119
text/plain :
84
120
schema :
85
- type : " string"
86
- examples :
87
- Example#1:
88
- value : " En uventet feil oppstod"
121
+ $ref : " #/components/schemas/HealthStatus"
122
+ " 503 " :
123
+ description : " Service Unavailable"
124
+ content :
125
+ text/plain :
126
+ schema :
127
+ $ref : " #/components/schemas/HealthStatus"
128
+ /internal/isReady :
129
+ get :
130
+ operationId : getIsReady
131
+ description : " Service is ready probe"
132
+ responses :
89
133
" 200 " :
90
- description : " "
134
+ description : " OK "
91
135
content :
92
136
text/plain :
93
137
schema :
94
- type : " string "
95
- examples :
96
- Example#1:
97
- value : " Intern feil, prøv igjen senere "
98
- ' */* ' :
138
+ $ref : " #/components/schemas/HealthStatus "
139
+ " 503 " :
140
+ description : " Service Unavailable "
141
+ content :
142
+ text/plain :
99
143
schema :
100
- $ref : " #/components/schemas/ResponseV2"
144
+ $ref : " #/components/schemas/HealthStatus"
145
+ /internal/metrics :
146
+ get :
147
+ operationId : getMetrics
148
+ description : " Prometheus metrics"
149
+ responses :
150
+ " 200 " :
151
+ description : " OK"
152
+ content :
153
+ application/json :
154
+ schema :
155
+ type : " string"
101
156
components :
102
157
schemas :
103
158
InfoResponse :
@@ -146,6 +201,8 @@ components:
146
201
type : " string"
147
202
required :
148
203
- " ident"
204
+ example :
205
+ ident : " 01017012345"
149
206
ResponseV2 :
150
207
type : " object"
151
208
properties :
@@ -155,3 +212,48 @@ components:
155
212
key :
156
213
type : " integer"
157
214
format : " int64"
215
+ example :
216
+ id : 1234
217
+ key : -1234
218
+ ProblemDetails :
219
+ type : object
220
+ properties :
221
+ id :
222
+ type : " string"
223
+ format : " uuid"
224
+ type :
225
+ type : " string"
226
+ format : " uri"
227
+ status :
228
+ type : " integer"
229
+ title :
230
+ type : " string"
231
+ detail :
232
+ type : " string"
233
+ instance :
234
+ type : " string"
235
+ timestamp :
236
+ type : " string"
237
+ format : " date-time"
238
+ required :
239
+ - id
240
+ - type
241
+ - status
242
+ - title
243
+ - detail
244
+ - instance
245
+ - timestamp
246
+ example :
247
+ id : " 3cd944fb-6187-41a8-91b2-b172f2baf890"
248
+ type : " urn:paw:default:ukjent-feil"
249
+ status : 500
250
+ title : " Internal Server Error"
251
+ detail : " Ukjent feil"
252
+ instance : " /api/v2/info"
253
+ timestamp : " 2021-01-01T12:00:00.000Z"
254
+ HealthStatus :
255
+ type : " string"
256
+ enum :
257
+ - " UNKNOWN"
258
+ - " HEALTHY"
259
+ - " UNHEALTHY"
0 commit comments