Skip to content

Commit 6ce7078

Browse files
committed
format kafkbat-ui openapi definition
1 parent 70517a0 commit 6ce7078

File tree

1 file changed

+37
-58
lines changed

1 file changed

+37
-58
lines changed

contract/src/main/resources/swagger/kafbat-ui-api.yaml

Lines changed: 37 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ info:
44
version: 0.1.0
55
title: Api Documentation
66
termsOfService: urn:tos
7-
contact: { }
7+
contact: {}
88
license:
99
name: Apache 2.0
1010
url: https://www.apache.org/licenses/LICENSE-2.0
@@ -31,7 +31,6 @@ paths:
3131
items:
3232
$ref: '#/components/schemas/Cluster'
3333

34-
3534
/api/clusters/{clusterName}/cache:
3635
post:
3736
tags:
@@ -54,7 +53,6 @@ paths:
5453
404:
5554
description: Not found
5655

57-
5856
/api/clusters/{clusterName}/brokers:
5957
get:
6058
tags:
@@ -432,7 +430,6 @@ paths:
432430
404:
433431
description: Not found
434432

435-
436433
/api/clusters/{clusterName}/topics/{topicName}:
437434
get:
438435
tags:
@@ -644,7 +641,6 @@ paths:
644641
schema:
645642
$ref: '#/components/schemas/SmartFilterTestExecutionResult'
646643

647-
648644
/api/clusters/{clusterName}/topics/{topicName}/messages:
649645
get:
650646
tags:
@@ -665,7 +661,7 @@ paths:
665661
- name: seekType
666662
in: query
667663
schema:
668-
$ref: "#/components/schemas/SeekType"
664+
$ref: '#/components/schemas/SeekType'
669665
- name: seekTo
670666
in: query
671667
schema:
@@ -684,19 +680,19 @@ paths:
684680
- name: filterQueryType
685681
in: query
686682
schema:
687-
$ref: "#/components/schemas/MessageFilterType"
683+
$ref: '#/components/schemas/MessageFilterType'
688684
- name: seekDirection
689685
in: query
690686
schema:
691-
$ref: "#/components/schemas/SeekDirection"
687+
$ref: '#/components/schemas/SeekDirection'
692688
- name: keySerde
693689
in: query
694-
description: "Serde that should be used for deserialization. Will be chosen automatically if not set."
690+
description: 'Serde that should be used for deserialization. Will be chosen automatically if not set.'
695691
schema:
696692
type: string
697693
- name: valueSerde
698694
in: query
699-
description: "Serde that should be used for deserialization. Will be chosen automatically if not set."
695+
description: 'Serde that should be used for deserialization. Will be chosen automatically if not set.'
700696
schema:
701697
type: string
702698
responses:
@@ -793,7 +789,6 @@ paths:
793789
schema:
794790
$ref: '#/components/schemas/MessageFilterId'
795791

796-
797792
/api/clusters/{clusterName}/topics/{topicName}/messages/v2:
798793
get:
799794
tags:
@@ -815,7 +810,7 @@ paths:
815810
in: query
816811
description: Messages polling mode
817812
schema:
818-
$ref: "#/components/schemas/PollingMode"
813+
$ref: '#/components/schemas/PollingMode'
819814
- name: partitions
820815
in: query
821816
schema:
@@ -852,17 +847,17 @@ paths:
852847
format: int64
853848
- name: keySerde
854849
in: query
855-
description: "Serde that should be used for deserialization. Will be chosen automatically if not set."
850+
description: 'Serde that should be used for deserialization. Will be chosen automatically if not set.'
856851
schema:
857852
type: string
858853
- name: valueSerde
859854
in: query
860-
description: "Serde that should be used for deserialization. Will be chosen automatically if not set."
855+
description: 'Serde that should be used for deserialization. Will be chosen automatically if not set.'
861856
schema:
862857
type: string
863858
- name: cursor
864859
in: query
865-
description: "id of the cursor for pagination, if passed - all other query params ignored"
860+
description: 'id of the cursor for pagination, if passed - all other query params ignored'
866861
schema:
867862
type: string
868863
responses:
@@ -875,7 +870,6 @@ paths:
875870
items:
876871
$ref: '#/components/schemas/TopicMessageEvent'
877872

878-
879873
/api/clusters/{clusterName}/topics/{topicName}/activeproducers:
880874
get:
881875
tags:
@@ -903,7 +897,6 @@ paths:
903897
items:
904898
$ref: '#/components/schemas/TopicProducerState'
905899

906-
907900
/api/clusters/{clusterName}/topics/{topicName}/consumer-groups:
908901
get:
909902
tags:
@@ -976,7 +969,6 @@ paths:
976969
schema:
977970
$ref: '#/components/schemas/ConsumerGroupsPageResponse'
978971

979-
980972
/api/clusters/{clusterName}/consumer-groups/{id}:
981973
get:
982974
tags:
@@ -1208,7 +1200,6 @@ paths:
12081200
404:
12091201
description: Not found
12101202

1211-
12121203
/api/clusters/{clusterName}/schemas/{subject}/versions/{version}:
12131204
get:
12141205
tags:
@@ -1699,7 +1690,6 @@ paths:
16991690
200:
17001691
description: OK
17011692

1702-
17031693
/api/clusters/{clusterName}/ksql/v2:
17041694
post:
17051695
tags:
@@ -2194,7 +2184,6 @@ paths:
21942184
schema:
21952185
$ref: '#/components/schemas/ApplicationConfigValidation'
21962186

2197-
21982187
/api/config/relatedfiles:
21992188
post:
22002189
tags:
@@ -2240,7 +2229,7 @@ components:
22402229
description:
22412230
type: string
22422231
preferred:
2243-
description: "This serde was automatically chosen by cluster config. This should be enabled in UI by default. Also it will be used for deserialization if no serdes passed."
2232+
description: 'This serde was automatically chosen by cluster config. This should be enabled in UI by default. Also it will be used for deserialization if no serdes passed.'
22442233
type: boolean
22452234
schema:
22462235
type: string
@@ -2527,7 +2516,7 @@ components:
25272516
partitions:
25282517
type: array
25292518
items:
2530-
$ref: "#/components/schemas/Partition"
2519+
$ref: '#/components/schemas/Partition'
25312520
required:
25322521
- name
25332522

@@ -2571,15 +2560,15 @@ components:
25712560
partitionStats:
25722561
type: array
25732562
items:
2574-
$ref: "#/components/schemas/TopicAnalysisStats"
2563+
$ref: '#/components/schemas/TopicAnalysisStats'
25752564

25762565
TopicAnalysisStats:
25772566
type: object
25782567
properties:
25792568
partition:
25802569
type: integer
25812570
format: int32
2582-
description: "null if this is total stats"
2571+
description: 'null if this is total stats'
25832572
totalMsgs:
25842573
type: integer
25852574
format: int64
@@ -2608,9 +2597,9 @@ components:
26082597
type: integer
26092598
format: int64
26102599
keySize:
2611-
$ref: "#/components/schemas/TopicAnalysisSizeStats"
2600+
$ref: '#/components/schemas/TopicAnalysisSizeStats'
26122601
valueSize:
2613-
$ref: "#/components/schemas/TopicAnalysisSizeStats"
2602+
$ref: '#/components/schemas/TopicAnalysisSizeStats'
26142603
hourlyMsgCounts:
26152604
type: array
26162605
items:
@@ -2625,7 +2614,7 @@ components:
26252614

26262615
TopicAnalysisSizeStats:
26272616
type: object
2628-
description: "All sizes in bytes"
2617+
description: 'All sizes in bytes'
26292618
properties:
26302619
sum:
26312620
type: integer
@@ -2675,7 +2664,7 @@ components:
26752664
partitions:
26762665
type: array
26772666
items:
2678-
$ref: "#/components/schemas/Partition"
2667+
$ref: '#/components/schemas/Partition'
26792668
partitionCount:
26802669
type: integer
26812670
replicationFactor:
@@ -2714,15 +2703,15 @@ components:
27142703
defaultValue:
27152704
type: string
27162705
source:
2717-
$ref: "#/components/schemas/ConfigSource"
2706+
$ref: '#/components/schemas/ConfigSource'
27182707
isSensitive:
27192708
type: boolean
27202709
isReadOnly:
27212710
type: boolean
27222711
synonyms:
27232712
type: array
27242713
items:
2725-
$ref: "#/components/schemas/ConfigSynonym"
2714+
$ref: '#/components/schemas/ConfigSynonym'
27262715
doc:
27272716
type: string
27282717
required:
@@ -2838,7 +2827,7 @@ components:
28382827
discriminator:
28392828
propertyName: inherit
28402829
mapping:
2841-
details: "#/components/schemas/ConsumerGroupDetails"
2830+
details: '#/components/schemas/ConsumerGroupDetails'
28422831
type: object
28432832
properties:
28442833
groupId:
@@ -2852,9 +2841,9 @@ components:
28522841
partitionAssignor:
28532842
type: string
28542843
state:
2855-
$ref: "#/components/schemas/ConsumerGroupState"
2844+
$ref: '#/components/schemas/ConsumerGroupState'
28562845
coordinator:
2857-
$ref: "#/components/schemas/Broker"
2846+
$ref: '#/components/schemas/Broker'
28582847
consumerLag:
28592848
type: integer
28602849
format: int64
@@ -2949,13 +2938,13 @@ components:
29492938
# otherwise ui should pass cursor param to continue polling
29502939
- DONE
29512940
message:
2952-
$ref: "#/components/schemas/TopicMessage"
2941+
$ref: '#/components/schemas/TopicMessage'
29532942
phase:
2954-
$ref: "#/components/schemas/TopicMessagePhase"
2943+
$ref: '#/components/schemas/TopicMessagePhase'
29552944
consuming:
2956-
$ref: "#/components/schemas/TopicMessageConsuming"
2945+
$ref: '#/components/schemas/TopicMessageConsuming'
29572946
cursor:
2958-
$ref: "#/components/schemas/TopicMessageNextPageCursor"
2947+
$ref: '#/components/schemas/TopicMessageNextPageCursor'
29592948

29602949
TopicMessagePhase:
29612950
type: object
@@ -3018,10 +3007,10 @@ components:
30183007
type: string
30193008
keyFormat:
30203009
#deprecated - wont be filled - use 'keySerde' field instead
3021-
$ref: "#/components/schemas/MessageFormat"
3010+
$ref: '#/components/schemas/MessageFormat'
30223011
valueFormat:
30233012
#deprecated - wont be filled - use 'valueSerde' field instead
3024-
$ref: "#/components/schemas/MessageFormat"
3013+
$ref: '#/components/schemas/MessageFormat'
30253014
keySize:
30263015
type: integer
30273016
format: int64
@@ -3147,7 +3136,6 @@ components:
31473136
- topic
31483137
- partition
31493138

3150-
31513139
ConsumerGroupDetails:
31523140
allOf:
31533141
- $ref: '#/components/schemas/ConsumerGroup'
@@ -3868,16 +3856,7 @@ components:
38683856

38693857
KafkaAcl:
38703858
type: object
3871-
required:
3872-
[
3873-
resourceType,
3874-
resourceName,
3875-
namePatternType,
3876-
principal,
3877-
host,
3878-
operation,
3879-
permission,
3880-
]
3859+
required: [resourceType, resourceName, namePatternType, principal, host, operation, permission]
38813860
properties:
38823861
resourceType:
38833862
$ref: '#/components/schemas/KafkaAclResourceType'
@@ -3894,15 +3873,15 @@ components:
38943873
enum:
38953874
- UNKNOWN # Unknown operation, need to update mapping code on BE
38963875
- ALL # Cluster, Topic, Group
3897-
- READ # Topic, Group
3876+
- READ # Topic, Group
38983877
- WRITE # Topic, TransactionalId
38993878
- CREATE # Cluster, Topic
3900-
- DELETE # Topic, Group
3901-
- ALTER # Cluster, Topic,
3879+
- DELETE # Topic, Group
3880+
- ALTER # Cluster, Topic,
39023881
- DESCRIBE # Cluster, Topic, Group, TransactionalId, DelegationToken
39033882
- CLUSTER_ACTION # Cluster
39043883
- DESCRIBE_CONFIGS # Cluster, Topic
3905-
- ALTER_CONFIGS # Cluster, Topic
3884+
- ALTER_CONFIGS # Cluster, Topic
39063885
- IDEMPOTENT_WRITE # Cluster
39073886
- CREATE_TOKENS
39083887
- DESCRIBE_TOKENS
@@ -4133,7 +4112,7 @@ components:
41334112
properties:
41344113
maxInMemoryBufferSize:
41354114
type: string
4136-
description: "examples: 20, 12KB, 5MB"
4115+
description: 'examples: 20, 12KB, 5MB'
41374116
kafka:
41384117
type: object
41394118
properties:
@@ -4190,7 +4169,7 @@ components:
41904169
keystoreLocation:
41914170
type: string
41924171
keystorePassword:
4193-
type: string
4172+
type: string
41944173
ksqldbServerAuth:
41954174
type: object
41964175
properties:
@@ -4298,7 +4277,7 @@ components:
42984277
properties:
42994278
level:
43004279
type: string
4301-
enum: [ "ALL", "ALTER_ONLY" ]
4280+
enum: ['ALL', 'ALTER_ONLY']
43024281
topic:
43034282
type: string
43044283
auditTopicsPartitions:

0 commit comments

Comments
 (0)