mirror of https://github.com/tiangolo/fastapi.git
Update fastapi/routing.py
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
This commit is contained in:
parent
28fa21fd1a
commit
4c9cf7439f
|
|
@ -1333,7 +1333,10 @@ class APIRouter(routing.Router):
|
|||
app.include_router(internal_router)
|
||||
```
|
||||
"""
|
||||
assert self is not router, "Cannot include router into itself"
|
||||
assert self is not router, (
|
||||
"Cannot include the same APIRouter instance into itself. "
|
||||
"Did you mean to include a different router?"
|
||||
)
|
||||
if prefix:
|
||||
assert prefix.startswith("/"), "A path prefix must start with '/'"
|
||||
assert not prefix.endswith("/"), (
|
||||
|
|
|
|||
Loading…
Reference in New Issue