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
In #65 I've changed it so that all prefixes are lowercase. Even if you specify prefix="MyModel" it would turn into "mymodel". That being said, this could cause problems if someone wanted an uppercase path prefix (for whatever reason). Alternatively, I can just fix the tortoise issue,
I started using this package this morning, and it's great to see that it is under development/maintenance!
The only feature that seems to be missing is filtering, but it seems that soon it will be available (#61).
When #65 is merged, feel free to close this issue.
When using TortoiseCRUDRouter, the CRUD routers generate a base prefix that has the same casing as the db_model.
For instance, for a router with prefix "/api", and an object CRUD router defined by
The generated CRUD route that appears in the
/doc
is/api/User
, which is quite odd for APIs.This issue seems to come from the interaction of these 2 lines
fastapi-crudrouter/fastapi_crudrouter/core/tortoise.py
Line 48 in e1a4a2b
fastapi-crudrouter/fastapi_crudrouter/core/_base.py
Line 49 in e1a4a2b
Since the
prefix
is defined in theTortoiseCRUDRouter
, it is never lowercasedThis might be intended. Anyway, this behavior can be circumvented by passing
prefix
to the TortoiseCRUDRouter.The text was updated successfully, but these errors were encountered: