From 22fc0a62c8bbb414586a13cc13c007b47c8dc8d5 Mon Sep 17 00:00:00 2001 From: Myroslav Vivcharyk Date: Mon, 23 Dec 2024 11:30:15 +0100 Subject: [PATCH] fix: patched ServiceKafkaQuotaDescribe required parameters --- .gitignore | 1 + Taskfile.yml | 3 +++ handler/kafka/kafka.go | 10 +++++----- openapi_patch.yaml | 4 ++++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 2a319b5..910d9bb 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ # Go workspace file go.work +go.work.sum ### GoLand+all ### # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider diff --git a/Taskfile.yml b/Taskfile.yml index b54cf76..03ef029 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -22,6 +22,9 @@ tasks: - rm -rf {{.GEN_OUT_DIR}} - GEN_OUT_DIR={{.GEN_OUT_DIR}} go run -tags=generator ./generator/... - task: fmt-imports + requires: + vars: + - GEN_OUT_DIR generate: cmds: - task: get-openapi-spec diff --git a/handler/kafka/kafka.go b/handler/kafka/kafka.go index a917be1..6134eeb 100644 --- a/handler/kafka/kafka.go +++ b/handler/kafka/kafka.go @@ -460,11 +460,11 @@ type ServiceKafkaQuotaCreateIn struct { // ServiceKafkaQuotaDescribeOut kafka quota type ServiceKafkaQuotaDescribeOut struct { - ClientId string `json:"client-id"` // client-id - ConsumerByteRate float64 `json:"consumer_byte_rate"` // consumer network throttle - ProducerByteRate float64 `json:"producer_byte_rate"` // producer network throttle - RequestPercentage float64 `json:"request_percentage"` // cpu percentage throttle - User string `json:"user"` // user + ClientId *string `json:"client-id,omitempty"` // client-id + ConsumerByteRate *float64 `json:"consumer_byte_rate,omitempty"` // consumer network throttle + ProducerByteRate *float64 `json:"producer_byte_rate,omitempty"` // producer network throttle + RequestPercentage *float64 `json:"request_percentage,omitempty"` // cpu percentage throttle + User *string `json:"user,omitempty"` // user } // ServiceKafkaTieredStorageSummaryOut ServiceKafkaTieredStorageSummaryResponse diff --git a/openapi_patch.yaml b/openapi_patch.yaml index f51b28f..1b58cd1 100644 --- a/openapi_patch.yaml +++ b/openapi_patch.yaml @@ -15,6 +15,10 @@ paths: components: schemas: + ServiceKafkaQuotaDescribeResponse: + properties: + quota: + required: [] ServiceDatabaseListResponse: properties: databases: