Skip to content

Commit

Permalink
since latest releases of pydantic CamelCaseEnummdoesnot work - temp f…
Browse files Browse the repository at this point in the history
…ix to force camelCase
  • Loading branch information
zworkb committed Apr 18, 2024
1 parent 94ca372 commit 3749e77
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/edutap/wallet_google/models/primitives/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 3749e77

Please sign in to comment.