diff --git a/CHANGELOG.md b/CHANGELOG.md index eda5a8b08..3c409f100 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -413,6 +413,8 @@ - **New**: API for STACKIT Telemetry Router - [v0.1.1](services/telemetryrouter/CHANGELOG.md#v011) - **Dependencies:** Bump STACKIT SDK core module from `v0.25.0` to `v0.26.0` + - [v0.2.0](services/telemetryrouter/CHANGELOG.md#v020) + - **Feature:** Added `_UNKNOWN_DEFAULT_OPEN_API` fallback value to all enums to handle unknown API values gracefully. - `vpn`: - [v0.4.2](services/vpn/CHANGELOG.md#v042) - **Dependencies:** Bump STACKIT SDK core module from `v0.24.0` to `v0.24.1` diff --git a/services/telemetryrouter/CHANGELOG.md b/services/telemetryrouter/CHANGELOG.md index 72fb92c20..84ef5c57c 100644 --- a/services/telemetryrouter/CHANGELOG.md +++ b/services/telemetryrouter/CHANGELOG.md @@ -1,3 +1,6 @@ +## v0.2.0 +- **Feature:** Added `_UNKNOWN_DEFAULT_OPEN_API` fallback value to all enums to handle unknown API values gracefully. + ## v0.1.1 - **Dependencies:** Bump STACKIT SDK core module from `v0.25.0` to `v0.26.0` diff --git a/services/telemetryrouter/VERSION b/services/telemetryrouter/VERSION index a1c2c6a9f..81fd7ba08 100644 --- a/services/telemetryrouter/VERSION +++ b/services/telemetryrouter/VERSION @@ -1 +1 @@ -v0.1.1 \ No newline at end of file +v0.2.0 \ No newline at end of file diff --git a/services/telemetryrouter/oas_commit b/services/telemetryrouter/oas_commit index 3417bbd13..6fdb25c73 100644 --- a/services/telemetryrouter/oas_commit +++ b/services/telemetryrouter/oas_commit @@ -1 +1 @@ -9918ffafed202332f2a1a5698aafa60eed59886f +c8e6adbf2c24050dca06a64b301b3a43ba28be6e diff --git a/services/telemetryrouter/v1betaapi/model_config_filter_level.go b/services/telemetryrouter/v1betaapi/model_config_filter_level.go index 1091d0102..ce036f271 100644 --- a/services/telemetryrouter/v1betaapi/model_config_filter_level.go +++ b/services/telemetryrouter/v1betaapi/model_config_filter_level.go @@ -20,9 +20,10 @@ type ConfigFilterLevel string // List of configFilterLevel const ( - CONFIGFILTERLEVEL_RESOURCE ConfigFilterLevel = "resource" - CONFIGFILTERLEVEL_SCOPE ConfigFilterLevel = "scope" - CONFIGFILTERLEVEL_LOG_RECORD ConfigFilterLevel = "logRecord" + CONFIGFILTERLEVEL_RESOURCE ConfigFilterLevel = "resource" + CONFIGFILTERLEVEL_SCOPE ConfigFilterLevel = "scope" + CONFIGFILTERLEVEL_LOG_RECORD ConfigFilterLevel = "logRecord" + CONFIGFILTERLEVEL_UNKNOWN_DEFAULT_OPEN_API ConfigFilterLevel = "unknown_default_open_api" ) // All allowed values of ConfigFilterLevel enum @@ -30,6 +31,7 @@ var AllowedConfigFilterLevelEnumValues = []ConfigFilterLevel{ "resource", "scope", "logRecord", + "unknown_default_open_api", } func (v *ConfigFilterLevel) UnmarshalJSON(src []byte) error { @@ -46,7 +48,8 @@ func (v *ConfigFilterLevel) UnmarshalJSON(src []byte) error { } } - return fmt.Errorf("%+v is not a valid ConfigFilterLevel", value) + *v = CONFIGFILTERLEVEL_UNKNOWN_DEFAULT_OPEN_API + return nil } // NewConfigFilterLevelFromValue returns a pointer to a valid ConfigFilterLevel diff --git a/services/telemetryrouter/v1betaapi/model_config_filter_matcher.go b/services/telemetryrouter/v1betaapi/model_config_filter_matcher.go index 1bbe46c4e..cc7f5d78f 100644 --- a/services/telemetryrouter/v1betaapi/model_config_filter_matcher.go +++ b/services/telemetryrouter/v1betaapi/model_config_filter_matcher.go @@ -20,14 +20,16 @@ type ConfigFilterMatcher string // List of configFilterMatcher const ( - CONFIGFILTERMATCHER_EQUAL ConfigFilterMatcher = "=" - CONFIGFILTERMATCHER_NOT_EQUAL ConfigFilterMatcher = "!=" + CONFIGFILTERMATCHER_EQUAL ConfigFilterMatcher = "=" + CONFIGFILTERMATCHER_NOT_EQUAL ConfigFilterMatcher = "!=" + CONFIGFILTERMATCHER_UNKNOWN_DEFAULT_OPEN_API ConfigFilterMatcher = "unknown_default_open_api" ) // All allowed values of ConfigFilterMatcher enum var AllowedConfigFilterMatcherEnumValues = []ConfigFilterMatcher{ "=", "!=", + "unknown_default_open_api", } func (v *ConfigFilterMatcher) UnmarshalJSON(src []byte) error { @@ -44,7 +46,8 @@ func (v *ConfigFilterMatcher) UnmarshalJSON(src []byte) error { } } - return fmt.Errorf("%+v is not a valid ConfigFilterMatcher", value) + *v = CONFIGFILTERMATCHER_UNKNOWN_DEFAULT_OPEN_API + return nil } // NewConfigFilterMatcherFromValue returns a pointer to a valid ConfigFilterMatcher diff --git a/services/telemetryrouter/v1betaapi/model_destination_config_type.go b/services/telemetryrouter/v1betaapi/model_destination_config_type.go index dc65d63b8..238097754 100644 --- a/services/telemetryrouter/v1betaapi/model_destination_config_type.go +++ b/services/telemetryrouter/v1betaapi/model_destination_config_type.go @@ -20,14 +20,16 @@ type DestinationConfigType string // List of destinationConfigType const ( - DESTINATIONCONFIGTYPE_OPEN_TELEMETRY DestinationConfigType = "OpenTelemetry" - DESTINATIONCONFIGTYPE_S3 DestinationConfigType = "S3" + DESTINATIONCONFIGTYPE_OPEN_TELEMETRY DestinationConfigType = "OpenTelemetry" + DESTINATIONCONFIGTYPE_S3 DestinationConfigType = "S3" + DESTINATIONCONFIGTYPE_UNKNOWN_DEFAULT_OPEN_API DestinationConfigType = "unknown_default_open_api" ) // All allowed values of DestinationConfigType enum var AllowedDestinationConfigTypeEnumValues = []DestinationConfigType{ "OpenTelemetry", "S3", + "unknown_default_open_api", } func (v *DestinationConfigType) UnmarshalJSON(src []byte) error { @@ -44,7 +46,8 @@ func (v *DestinationConfigType) UnmarshalJSON(src []byte) error { } } - return fmt.Errorf("%+v is not a valid DestinationConfigType", value) + *v = DESTINATIONCONFIGTYPE_UNKNOWN_DEFAULT_OPEN_API + return nil } // NewDestinationConfigTypeFromValue returns a pointer to a valid DestinationConfigType