- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for add_route (0.08 sec)
-
fastapi/applications.py
) self.add_route(self.docs_url, swagger_ui_html, include_in_schema=False) if self.swagger_ui_oauth2_redirect_url: async def swagger_ui_redirect(req: Request) -> HTMLResponse: return get_swagger_ui_oauth2_redirect_html() self.add_route( self.swagger_ui_oauth2_redirect_url,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 17 04:52:31 UTC 2024 - 172.2K bytes - Viewed (0) -
fastapi/routing.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 12 09:44:57 UTC 2024 - 172.1K bytes - Viewed (0) -
tests/main.py
import http from typing import FrozenSet, List, Optional from fastapi import FastAPI, Path, Query app = FastAPI() @app.api_route("/api_route") def non_operation(): return {"message": "Hello World"} def non_decorated_route(): return {"message": "Hello World"} app.add_api_route("/non_decorated_route", non_decorated_route) @app.get("/text") def get_text(): return "Hello World"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 21:56:59 UTC 2024 - 4.3K bytes - Viewed (0) -
tests/test_application.py
from fastapi.testclient import TestClient from .main import app client = TestClient(app) @pytest.mark.parametrize( "path,expected_status,expected_response", [ ("/api_route", 200, {"message": "Hello World"}), ("/non_decorated_route", 200, {"message": "Hello World"}), ("/nonexistent", 404, {"detail": "Not Found"}), ], )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 21:56:59 UTC 2024 - 52.2K bytes - Viewed (0)