Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions contract/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import org.openapitools.generator.gradle.plugin.tasks.GenerateTask
plugins {
id "java-library"
alias(libs.plugins.openapi.generator)
alias(libs.plugins.openapi.validator)
}


Expand Down Expand Up @@ -60,6 +61,21 @@ tasks.register('generateBackendApi', GenerateTask) {
"""]
}

openAPIStyleValidator {
inputFile = "${project.projectDir}/src/main/resources/swagger/kafbat-ui-api.yaml"
validateModelPropertiesDescription = false
validateModelPropertiesExample = false
parameterNamingConvention = "UnderscoreCase"
propertyNamingConvention = "camelCase"
queryParamNamingConvention = "camelCase"
pathParamNamingConvention = "camelCase"
validateOperationDescription = false
validateInfoLicense = false
validateInfoDescription = false
validateInfoContact = false
}


tasks.register('generateConnectClient', GenerateTask) {
generatorName = "java"
inputSpec = specDir.file("kafka-connect-api.yaml").asFile.absolutePath
Expand Down
32 changes: 15 additions & 17 deletions contract/src/main/resources/swagger/kafbat-ui-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2157,7 +2157,7 @@ paths:
204:
description: Existing quota deleted

/api/clusters/{clusterName}/acl/streamApp:
/api/clusters/{clusterName}/acl/streamapp:
post:
tags:
- Acls
Expand Down Expand Up @@ -2486,7 +2486,6 @@ components:
- KAFKA_ACL_EDIT # create & delete ACLs
- CLIENT_QUOTA_MANAGEMENT
required:
- id
- name
- status

Expand Down Expand Up @@ -3237,7 +3236,6 @@ components:
type: integer
format: int64
required:
- topic
- partition
- offsetMax
- offsetMin
Expand Down Expand Up @@ -3439,16 +3437,16 @@ components:
type: string
address:
type: string
connectors_count:
connectorsCount:
type: integer
nullable: true
failed_connectors_count:
failedConnectorsCount:
type: integer
nullable: true
tasks_count:
tasksCount:
type: integer
nullable: true
failed_tasks_count:
failedTasksCount:
type: integer
nullable: true
required:
Expand Down Expand Up @@ -3567,21 +3565,21 @@ components:
type: integer
state:
$ref: '#/components/schemas/ConnectorTaskStatus'
worker_id:
workerId:
type: string
trace:
type: string
required:
- id
- state
- worker_id
- workerId

ConnectorStatus:
type: object
properties:
state:
$ref: '#/components/schemas/ConnectorState'
worker_id:
workerId:
type: string
required:
- state
Expand Down Expand Up @@ -3646,7 +3644,7 @@ components:
- STRING
required:
type: boolean
default_value:
defaultValue:
type: string
importance:
type: string
Expand All @@ -3665,7 +3663,7 @@ components:
- MEDIUM
- LONG
- NONE
display_name:
displayName:
type: string
dependents:
type: array
Expand All @@ -3681,7 +3679,7 @@ components:
type: string
value:
type: string
recommended_values:
recommendedValues:
type: array
items:
type: string
Expand All @@ -3705,7 +3703,7 @@ components:
properties:
name:
type: string
error_count:
errorCount:
type: integer
groups:
type: array
Expand Down Expand Up @@ -3791,7 +3789,7 @@ components:
type: string
name:
type: string
connector_class:
connectorClass:
type: string
type:
$ref: '#/components/schemas/ConnectorType'
Expand All @@ -3801,9 +3799,9 @@ components:
type: string
status:
$ref: '#/components/schemas/ConnectorStatus'
tasks_count:
tasksCount:
type: integer
failed_tasks_count:
failedTasksCount:
type: integer
required:
- name
Expand Down
3 changes: 3 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,16 @@ spring-boot = { id = 'org.springframework.boot', version.ref = 'spring-boot' }
spring-dependency-management = { id = 'io.spring.dependency-management', version = '1.1.3' }
git-properties = { id = 'com.gorylenko.gradle-git-properties', version = '2.4.2' }
openapi-generator = { id = 'org.openapi.generator', version = '7.9.0' }
openapi-validator = {id = "org.openapitools.openapistylevalidator", version = "1.10" }
allure = { id = 'io.qameta.allure', version = '2.10.0' }
nexus-publish-plugin = { id = 'io.github.gradle-nexus.publish-plugin', version = '1.1.0' }
node-gradle = { id = 'com.github.node-gradle.node', version = '7.1.0' }
#jib = { id = 'com.google.cloud.tools.jib', version = '3.4.4' }
docker-remote-api = { id = 'com.bmuschko.docker-remote-api', version = '9.4.0' }
sonarqube = { id = "org.sonarqube", version = "6.0.1.5171" }



[libraries]
spring-starter-actuator = { module = 'org.springframework.boot:spring-boot-starter-actuator', version.ref = 'spring-boot' }
spring-starter-test = { module = 'org.springframework.boot:spring-boot-starter-test', version.ref = 'spring-boot' }
Expand Down
Loading