mirror of https://github.com/tiangolo/fastapi.git
Update routing.py
This commit is contained in:
parent
3425c834cc
commit
8a0a360505
|
|
@ -1204,6 +1204,7 @@ class APIRouter(routing.Router):
|
|||
app.include_router(internal_router)
|
||||
```
|
||||
"""
|
||||
assert self != router, "Router cannot be the same as parent"
|
||||
if prefix:
|
||||
assert prefix.startswith("/"), "A path prefix must start with '/'"
|
||||
assert not prefix.endswith(
|
||||
|
|
|
|||
Loading…
Reference in New Issue