Skip to content

Commit 3e26892

Browse files
chore(openapi): update kafka-admin/v1 OpenAPI document (#65)
Co-authored-by: app-services-ci <app-services-ci@users.noreply.github.com>
1 parent f562c45 commit 3e26892

1 file changed

Lines changed: 79 additions & 86 deletions

File tree

.openapi/kafka-admin-rest.yaml

Lines changed: 79 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -82,20 +82,16 @@ paths:
8282
description: List of topics matching the users query paramters.
8383
'400':
8484
content:
85-
application/json: {}
86-
description: Unable to retreive topics.
85+
application/json:
86+
schema:
87+
$ref: '#/components/schemas/Error'
88+
description: Unable to retrieve topics.
8789
'401':
88-
content:
89-
application/json: {}
90-
description: 'Unauthorized, unable to retrive topics.'
90+
$ref: '#/components/responses/NotAuthorized'
9191
'500':
92-
content:
93-
application/json: {}
94-
description: Internal server error.
92+
$ref: '#/components/responses/ServerError'
9593
'503':
96-
content:
97-
application/json: {}
98-
description: Unable to connect to the Kafka cluster.
94+
$ref: '#/components/responses/ServiceUnavailable'
9995
operationId: getTopics
10096
summary: List of topics
10197
description: >-
@@ -130,15 +126,15 @@ paths:
130126
$ref: '#/components/schemas/Topic'
131127
description: Topic created successfully.
132128
'400':
133-
description: Unable to create topic.
129+
$ref: '#/components/responses/BadRequest'
134130
'401':
135-
description: 'Unauthorized, Unable to create topic.'
131+
$ref: '#/components/responses/NotAuthorized'
136132
'409':
137-
description: Entry already exisits
133+
$ref: '#/components/responses/Conflict'
138134
'500':
139-
description: Internal server error.
135+
$ref: '#/components/responses/ServerError'
140136
'503':
141-
description: Unable to connect to the Kafka cluster.
137+
$ref: '#/components/responses/ServiceUnavailable'
142138
operationId: createTopic
143139
summary: Creates a new topic
144140
description: Creates a new topic for Kafka.
@@ -160,21 +156,17 @@ paths:
160156
$ref: '#/components/schemas/Topic'
161157
description: Kafka topic details.
162158
'401':
163-
content:
164-
application/json: {}
165-
description: 'Unauthorized, unable to retrieve topics.'
159+
$ref: '#/components/responses/NotAuthorized'
166160
'404':
167161
content:
168-
application/json: {}
162+
application/json:
163+
schema:
164+
$ref: '#/components/schemas/Error'
169165
description: Topic not found.
170166
'500':
171-
content:
172-
application/json: {}
173-
description: Internal server error.
167+
$ref: '#/components/responses/ServerError'
174168
'503':
175-
content:
176-
application/json: {}
177-
description: Unable to connect to the Kafka cluster.
169+
$ref: '#/components/responses/ServiceUnavailable'
178170
operationId: getTopic
179171
summary: Retrieves the topic with the specified name.
180172
description: Topic
@@ -191,13 +183,17 @@ paths:
191183
'200':
192184
description: Topic deleted successfully.
193185
'401':
194-
description: 'Unathorized, unable to delete topic.'
186+
$ref: '#/components/responses/NotAuthorized'
195187
'404':
188+
content:
189+
application/json:
190+
schema:
191+
$ref: '#/components/schemas/Error'
196192
description: Topic not found.
197193
'500':
198-
description: Internal server error.
194+
$ref: '#/components/responses/ServerError'
199195
'503':
200-
description: Unable to connect to the Kafka cluster.
196+
$ref: '#/components/responses/ServiceUnavailable'
201197
operationId: deleteTopic
202198
summary: Deletes a topic
203199
description: Deletes the topic with the specified name.
@@ -224,15 +220,19 @@ paths:
224220
$ref: '#/components/schemas/Topic'
225221
description: Topic updated successfully.
226222
'400':
227-
description: Unable to update topic.
223+
$ref: '#/components/responses/BadRequest'
228224
'401':
229-
description: 'Unauthroized, unable to update topic.'
225+
$ref: '#/components/responses/NotAuthorized'
230226
'404':
227+
content:
228+
application/json:
229+
schema:
230+
$ref: '#/components/schemas/Error'
231231
description: Topic not found.
232232
'500':
233-
description: Internal server error.
233+
$ref: '#/components/responses/ServerError'
234234
'503':
235-
description: Unable to connect to the Kafka cluster.
235+
$ref: '#/components/responses/ServiceUnavailable'
236236
operationId: updateTopic
237237
summary: Updates the topic with the specified name.
238238
description: updates the topic with the new data.
@@ -322,27 +322,23 @@ paths:
322322
$ref: '#/components/schemas/ConsumerGroup'
323323
description: Consumer group details.
324324
'401':
325-
content:
326-
application/json: {}
327-
description: >-
328-
Unauthorized, request has not been applied because it lacks valid authentication
329-
credentials.
325+
$ref: '#/components/responses/NotAuthorized'
330326
'403':
331327
content:
332-
application/json: {}
328+
application/json:
329+
schema:
330+
$ref: '#/components/schemas/Error'
333331
description: User is forbidden this view this consumer group.
334332
'404':
335333
content:
336-
application/json: {}
334+
application/json:
335+
schema:
336+
$ref: '#/components/schemas/Error'
337337
description: Consumer group not found.
338338
'500':
339-
content:
340-
application/json: {}
341-
description: Internal server error.
339+
$ref: '#/components/responses/ServerError'
342340
'503':
343-
content:
344-
application/json: {}
345-
description: Unable to connect to the Kafka cluster.
341+
$ref: '#/components/responses/ServiceUnavailable'
346342
operationId: getConsumerGroupById
347343
summary: Get a single consumer group by its unique ID.
348344
delete:
@@ -358,31 +354,29 @@ paths:
358354
'204':
359355
description: The consumer group was deleted successfully.
360356
'401':
361-
content:
362-
application/json: {}
363-
description: >-
364-
Unauthorized, request has not been applied because it lacks valid authentication
365-
credentials.
357+
$ref: '#/components/responses/NotAuthorized'
366358
'403':
367359
content:
368-
application/json: {}
360+
application/json:
361+
schema:
362+
$ref: '#/components/schemas/Error'
369363
description: Forbidden to delete this consumer group.
370364
'404':
371365
content:
372-
application/json: {}
366+
application/json:
367+
schema:
368+
$ref: '#/components/schemas/Error'
373369
description: The consumer group does not exist.
374370
'423':
375371
content:
376-
application/json: {}
372+
application/json:
373+
schema:
374+
$ref: '#/components/schemas/Error'
377375
description: User cannot delete consumer group with active members.
378376
'500':
379-
content:
380-
application/json: {}
381-
description: Internal Server Error.
377+
$ref: '#/components/responses/ServerError'
382378
'503':
383-
content:
384-
application/json: {}
385-
description: Unable to connect to the Kafka cluster.
379+
$ref: '#/components/responses/ServiceUnavailable'
386380
operationId: deleteConsumerGroupById
387381
summary: Delete a consumer group.
388382
description: 'Delete a consumer group, along with its consumers.'
@@ -486,28 +480,24 @@ paths:
486480
description: List of consumer groups matching the request parameters.
487481
'400':
488482
content:
489-
application/json: {}
483+
application/json:
484+
schema:
485+
$ref: '#/components/schemas/Error'
490486
description: >-
491487
The server cannot or will not process the request due to something that is perceived
492488
to be a client error such as malformed request syntax.
493489
'401':
494-
content:
495-
application/json: {}
496-
description: >-
497-
Unauthorized, request has not been applied because it lacks valid authentication
498-
credentials.
490+
$ref: '#/components/responses/NotAuthorized'
499491
'403':
500492
content:
501-
application/json: {}
493+
application/json:
494+
schema:
495+
$ref: '#/components/schemas/Error'
502496
description: User is forbidden to retrieve the list of consumer groups.
503497
'500':
504-
content:
505-
application/json: {}
506-
description: An internal server error occurred.
498+
$ref: '#/components/responses/ServerError'
507499
'503':
508-
content:
509-
application/json: {}
510-
description: Unable to connect to the Kafka cluster.
500+
$ref: '#/components/responses/ServiceUnavailable'
511501
operationId: getConsumerGroups
512502
summary: List of consumer groups in the Kafka instance.
513503
description: Returns a list of all consumer groups for a particular Kafka instance.
@@ -549,27 +539,23 @@ paths:
549539
'400':
550540
description: The consumer group to reset the offset does have active consumers.
551541
'401':
552-
content:
553-
application/json: {}
554-
description: >-
555-
Unauthorized, request has not been applied because it lacks valid authentication
556-
credentials.
542+
$ref: '#/components/responses/NotAuthorized'
557543
'403':
558544
content:
559-
application/json: {}
545+
application/json:
546+
schema:
547+
$ref: '#/components/schemas/Error'
560548
description: Forbidden to delete this consumer group.
561549
'404':
562550
content:
563-
application/json: {}
551+
application/json:
552+
schema:
553+
$ref: '#/components/schemas/Error'
564554
description: Specified topic or its partition does not exist.
565555
'500':
566-
content:
567-
application/json: {}
568-
description: Internal Server Error.
556+
$ref: '#/components/responses/ServerError'
569557
'503':
570-
content:
571-
application/json: {}
572-
description: Unable to connect to the Kafka cluster.
558+
$ref: '#/components/responses/ServiceUnavailable'
573559
operationId: resetConsumerGroupOffset
574560
summary: Reset the offset for a consumer group.
575561
description: Reset the offset for a particular consumer group.
@@ -1411,6 +1397,13 @@ components:
14111397
application/json:
14121398
schema:
14131399
$ref: '#/components/schemas/Error'
1400+
Conflict:
1401+
# Status 409
1402+
description: The resource already exists.
1403+
content:
1404+
application/json:
1405+
schema:
1406+
$ref: '#/components/schemas/Error'
14141407
ServerError:
14151408
# Status 500
14161409
description: Internal server error

0 commit comments

Comments
 (0)