- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 322 for openapi_schema (0.44 sec)
-
docs_src/extending_openapi/tutorial001.py
def custom_openapi(): if app.openapi_schema: return app.openapi_schema openapi_schema = get_openapi( title="Custom title", version="2.5.0", summary="This is a very custom OpenAPI schema", description="Here's a longer description of the custom **OpenAPI** schema", routes=app.routes, ) openapi_schema["info"]["x-logo"] = {
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 737 bytes - Viewed (0) -
tests/test_tutorial/test_sub_applications/test_tutorial001.py
} } }, "servers": [{"url": "/subapi"}], } def test_openapi_schema_main(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == openapi_schema_main def test_main(): response = client.get("/app") assert response.status_code == 200, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 1.9K bytes - Viewed (0) -
tests/test_tutorial/test_extending_openapi/test_tutorial001.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 1.5K bytes - Viewed (0) -
tests/test_additional_responses_bad.py
from fastapi.testclient import TestClient app = FastAPI() @app.get("/a", responses={"hello": {"description": "Not a valid additional response"}}) async def a(): pass # pragma: no cover openapi_schema = { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/a": { "get": { "responses": {
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 1.1K bytes - Viewed (0) -
tests/test_param_include_in_schema.py
}, }, } }, } def test_openapi_schema(): client = TestClient(app) response = client.get("/openapi.json") assert response.status_code == 200 assert response.json() == openapi_schema @pytest.mark.parametrize( "path,cookies,expected_status,expected_response", [ (
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 7.4K bytes - Viewed (0) -
docs/en/docs/how-to/extending-openapi.md
It just returns a JSON response with the result of the application's `.openapi()` method. By default, what the method `.openapi()` does is check the property `.openapi_schema` to see if it has contents and return them. If it doesn't, it generates them using the utility function at `fastapi.openapi.utils.get_openapi`. And that function `get_openapi()` receives as parameters:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Aug 19 19:54:04 GMT 2023 - 3.2K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial003.py
client = TestClient(app) def test_get(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [{"item_id": "Foo"}] def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"},
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 575 bytes - Viewed (0) -
tests/test_tutorial/test_testing/test_tutorial001.py
from docs_src.app_testing.tutorial001 import client, test_read_main def test_main(): test_read_main() def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/": { "get": {
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 821 bytes - Viewed (0) -
docs/de/docs/how-to/extending-openapi.md
Diese gibt lediglich eine JSON-Response zurück, mit dem Ergebnis der Methode `.openapi()` der Anwendung. Standardmäßig überprüft die Methode `.openapi()` die Eigenschaft `.openapi_schema`, um zu sehen, ob diese Inhalt hat, und gibt diesen zurück. Ist das nicht der Fall, wird der Inhalt mithilfe der Hilfsfunktion unter `fastapi.openapi.utils.get_openapi` generiert.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 14 16:44:05 GMT 2024 - 3.7K bytes - Viewed (0) -
docs/em/docs/how-to/extending-openapi.md
`FastAPI` 🈸 (👐) ✔️ `.openapi()` 👩🔬 👈 📈 📨 🗄 🔗. 🍕 🈸 🎚 🏗, *➡ 🛠️* `/openapi.json` (⚖️ ⚫️❔ 👆 ⚒ 👆 `openapi_url`) ®. ⚫️ 📨 🎻 📨 ⏮️ 🏁 🈸 `.openapi()` 👩🔬. 🔢, ⚫️❔ 👩🔬 `.openapi()` 🔨 ✅ 🏠 `.openapi_schema` 👀 🚥 ⚫️ ✔️ 🎚 & 📨 👫. 🚥 ⚫️ 🚫, ⚫️ 🏗 👫 ⚙️ 🚙 🔢 `fastapi.openapi.utils.get_openapi`. & 👈 🔢 `get_openapi()` 📨 🔢: * `title`: 🗄 📛, 🎦 🩺. * `version`: ⏬ 👆 🛠️, ✅ `2.5.0`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Aug 19 19:54:04 GMT 2023 - 2.7K bytes - Viewed (1)