mirror of
https://github.com/fastapi/fastapi.git
synced 2026-10-21 09:25:25 -04:00
✨ Auto-generate OpenAPI servers from root_path (#1596)
* root_path included in servers object instead of path prefix * ♻️ Refactor implementation of auto-including root_path in OpenAPI servers * 📝 Update docs and examples for Behind a Proxy, including servers * 📝 Update Extending OpenAPI as openapi_prefix is no longer needed * ✅ Add extra tests for root_path in servers and root_path_in_servers=False * 🍱 Update security docs images with relative token URL * 📝 Update security docs with relative token URL * 📝 Update example sources with relative token URLs * ✅ Update tests with relative tokens Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
This commit is contained in:
1 parent
340a582be7
commit
70a51b3aff
35 files changed
+241
-57
No files matched your search
@@ -6,7 +6,7 @@ from pydantic import BaseModel
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/token")
|
||||
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
|
||||
|
||||
|
||||
class User(BaseModel):
|
||||
|
||||
Reference in new issue
Block a user