litestar-users
litestar-users copied to clipboard
feat: allow identifier URI customization
This PR enables the customization of the name and type of the identifier URI for the user_management_handler_config and role_management_handler_config route generators.
Thanks for this, I'm currently on leave and will give it proper eyes once I'm back
I'm curious to see the behaviour when the path param name doesn't match the variable name. This setting effectively allows this:
@post("/some/path/{foo:uuid}")
def add_user(id_: UUID, ...) -> User:
...
In which case id_ will just be registered as a query param?
Thanks for this, I'm currently on leave and will give it proper eyes once I'm back
I'm curious to see the behaviour when the path param name doesn't match the variable name. This setting effectively allows this:
@post("/some/path/{foo:uuid}") def add_user(id_: UUID, ...) -> User: ...In which case
id_will just be registered as a query param?
Good question. I intended to add a few tests to this before the break, but I ran out of time.
There's one additional feature that I would like to see implemented, but I'll ping you in discord re: the best approach for this.
Closing this as I believe this was handled some months ago.