awtkns / fastapi-crudrouter

A dynamic FastAPI router that automatically creates CRUD routes for your models
https://fastapi-crudrouter.awtkns.com
MIT License
1.34k stars 156 forks source link

Allow providing additional parameters to FastAPIs add_api_route() function #188

Open AndreasMietk opened 11 months ago

AndreasMietk commented 11 months ago

Currently the internal _add_api_route() function is implemented with **kwargs which is passed to FastAPIs add_api_route()

Unfortunately its not possible to add any **kwargs, because all the CRUD functions aren't utilising it.

I came to this issue because i use the OpenAPIGenerator which translates the opertaion_id argument as the function being called.

If it is not provided, the generated function name is very ugly such as routeActivitiesItemIdPut for and update function.