Describe the bug
Failing to apply Pydantic alias_gnerator config, to convert fields to camelCase in response body.
api = NinjaAPI()
def to_camel(string: str) -> str:
return ''.join(word.capitalize() for word in string.split('_'))
class AddResult(Schema):
total_sum: int
class Config(Schema.Config):
alias_generator = to_camel
allow_population_by_field_name = True
@api.get("/add", response=AddResult)
def add(request, a: int, b: int):
return AddResult(total_sum=a + b)
Expected response:
Docs

Versions (please complete the following information):
- Python version: [3.9]
- Django version: [4.0.4]
- Django-Ninja version: [0.18.0]