VORKOUT-13 #8

Merged
vlad.dev merged 3 commits from VORKOUT-13 into master 2025-05-23 18:07:39 +05:00
2 changed files with 2 additions and 6 deletions
Showing only changes of commit 86d48d0d1c - Show all commits

View File

@ -1,11 +1,10 @@
from pydantic import BaseModel, ConfigDict
from api.utils.mapper import to_camel
from pydantic.alias_generators import to_camel
class Base(BaseModel):
model_config = ConfigDict(
from_attributes=True,
alias_generator=to_camel,
populate_by_name=True
populate_by_name=True,
)

View File

@ -1,3 +0,0 @@
def to_camel(string: str) -> str:
splitted = string.split("_")
return splitted[0] + "".join(word.capitalize() for word in splitted[1:])