From ed19a0c7efd2425d6c15226635c919cfa1ce6af0 Mon Sep 17 00:00:00 2001 From: Murad Biashimov Date: Wed, 22 May 2024 12:38:56 +0200 Subject: [PATCH] fix: empty enum choice --- internal/convert/convert.go | 4 +++- pkg/dist/integration_endpoint_types.yml | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/convert/convert.go b/internal/convert/convert.go index 180c361..c3d0843 100644 --- a/internal/convert/convert.go +++ b/internal/convert/convert.go @@ -96,7 +96,9 @@ func UserConfigSchema(v aiven.UserConfigSchema) (*types.UserConfigSchema, error) e := make([]types.UserConfigSchemaEnumValue, 0, len(v.Enum)) for _, v := range v.Enum { - e = append(e, types.UserConfigSchemaEnumValue{Value: v}) + if v != "" { + e = append(e, types.UserConfigSchemaEnumValue{Value: v}) + } } // YAML uses scientific notation for floats, they won't change that diff --git a/pkg/dist/integration_endpoint_types.yml b/pkg/dist/integration_endpoint_types.yml index 0625627..9b233d8 100644 --- a/pkg/dist/integration_endpoint_types.yml +++ b/pkg/dist/integration_endpoint_types.yml @@ -308,7 +308,6 @@ external_kafka: - string enum: - value: https - - value: "" example: https external_opensearch_logs: type: object