You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to pass model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True, from_attributes=True) to every generated schema and pass by_alias=True to every generated API view. This allows use of camelcase.
Currently in ninja-extra ModelConfig there is no way to apply properties to the generated schemas. I think at fault here is actually django-ninja's create_schema() function for not accepting a way to customise the Config or model_config options.
I think my latter point is fixed by adding create_route_info={'by_alias': True} or similar to the ModelConfig() arguments.
The text was updated successfully, but these errors were encountered:
I would like to pass
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True, from_attributes=True)
to every generated schema and passby_alias=True
to every generated API view. This allows use of camelcase.Currently in ninja-extra
ModelConfig
there is no way to apply properties to the generated schemas. I think at fault here is actually django-ninja'screate_schema()
function for not accepting a way to customise theConfig
ormodel_config
options.I think my latter point is fixed by adding
create_route_info={'by_alias': True}
or similar to theModelConfig()
arguments.The text was updated successfully, but these errors were encountered: