From 3749e773d8a58ae00ac92bf260745969acc24bb8 Mon Sep 17 00:00:00 2001 From: Philipp Auersperg-Castell Date: Thu, 18 Apr 2024 06:58:52 +0200 Subject: [PATCH] since latest releases of pydantic CamelCaseEnummdoesnot work - temp fix to force camelCase --- src/edutap/wallet_google/models/primitives/enums.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/edutap/wallet_google/models/primitives/enums.py b/src/edutap/wallet_google/models/primitives/enums.py index 3ff52b8..cc712b8 100644 --- a/src/edutap/wallet_google/models/primitives/enums.py +++ b/src/edutap/wallet_google/models/primitives/enums.py @@ -22,7 +22,12 @@ def __new__(cls: type["CamelCaseAliasEnum"], value: str) -> "CamelCaseAliasEnum" camel = "".join( [(x.capitalize() if count != 0 else x) for count, x in enumerate(parts)] ) + + # TODO: fix this so that UPPER_CASE andupperCase work + obj._value_ = camel cls._value2member_map_[camel] = obj + cls._member_map_[camel] = obj + cls._member_names_.append(camel) return obj