- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for HTTPURL (0.03 sec)
-
docs_src/openapi_callbacks/tutorial001_py310.py
from fastapi import APIRouter, FastAPI from pydantic import BaseModel, HttpUrl app = FastAPI() class Invoice(BaseModel): id: str title: str | None = None customer: str total: float class InvoiceEvent(BaseModel): description: str paid: bool class InvoiceEventReceived(BaseModel): ok: bool invoices_callback_router = APIRouter() @invoices_callback_router.post(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 10 08:55:32 UTC 2025 - 1.3K bytes - Viewed (0) -
tests/test_additional_responses_custom_model_in_callback.py
from fastapi import APIRouter, FastAPI from fastapi.testclient import TestClient from inline_snapshot import snapshot from pydantic import BaseModel, HttpUrl from starlette.responses import JSONResponse class CustomModel(BaseModel): a: int app = FastAPI() callback_router = APIRouter(default_response_class=JSONResponse) @callback_router.get( "{$callback_url}/callback/", responses={400: {"model": CustomModel}} )
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 5.8K bytes - Viewed (0) -
docs_src/openapi_callbacks/tutorial001_py39.py
from typing import Union from fastapi import APIRouter, FastAPI from pydantic import BaseModel, HttpUrl app = FastAPI() class Invoice(BaseModel): id: str title: Union[str, None] = None customer: str total: float class InvoiceEvent(BaseModel): description: str paid: bool class InvoiceEventReceived(BaseModel): ok: bool invoices_callback_router = APIRouter()
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.3K bytes - Viewed (0) -
tests/test_sub_callbacks.py
from typing import Optional from fastapi import APIRouter, FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel, HttpUrl app = FastAPI() class Invoice(BaseModel): id: str title: Optional[str] = None customer: str total: float class InvoiceEvent(BaseModel): description: str paid: bool class InvoiceEventReceived(BaseModel): ok: bool
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 12.9K bytes - Viewed (0) -
docs/de/docs/tutorial/body-nested-models.md
Zum Beispiel, da wir im `Image`-Modell ein Feld `url` haben, können wir deklarieren, dass das eine Instanz von Pydantics `HttpUrl` sein soll, anstelle eines `str`: {* ../../docs_src/body_nested_models/tutorial005_py310.py hl[2,8] *} Es wird getestet, ob der String eine gültige URL ist, und als solche wird er in JSON Schema / OpenAPI dokumentiert.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 7.6K bytes - Viewed (0) -
docs/pt/docs/tutorial/body-nested-models.md
Por exemplo, no modelo `Image` nós temos um campo `url`, nós podemos declara-lo como um `HttpUrl` do Pydantic invés de como uma `str`: {* ../../docs_src/body_nested_models/tutorial005_py310.py hl[2,8] *} A string será verificada para se tornar uma URL válida e documentada no JSON Schema / OpenAPI como tal.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 7.4K bytes - Viewed (0) -
docs/es/docs/tutorial/body-nested-models.md
Por ejemplo, como en el modelo `Image` tenemos un campo `url`, podemos declararlo como una instance de `HttpUrl` de Pydantic en lugar de un `str`: {* ../../docs_src/body_nested_models/tutorial005_py310.py hl[2,8] *} El string será verificado para ser una URL válida, y documentado en JSON Schema / OpenAPI como tal.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 7.2K bytes - Viewed (0) -
docs/en/docs/tutorial/body-nested-models.md
For example, as in the `Image` model we have a `url` field, we can declare it to be an instance of Pydantic's `HttpUrl` instead of a `str`: {* ../../docs_src/body_nested_models/tutorial005_py310.py hl[2,8] *} The string will be checked to be a valid URL, and documented in JSON Schema / OpenAPI as such.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 6.7K bytes - Viewed (0) -
docs/ru/docs/tutorial/body-nested-models.md
Например, так как в модели `Image` у нас есть поле `url`, то мы можем объявить его как тип `HttpUrl` из Pydantic вместо типа `str`: {* ../../docs_src/body_nested_models/tutorial005_py310.py hl[2,8] *} Строка будет проверена на соответствие допустимому URL-адресу и задокументирована в JSON Schema / OpenAPI как таковая.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 11.5K bytes - Viewed (0) -
CHANGELOG.md
`DurationUnit` which was a typealias in 1.5.x. * Upgrade: [Okio 3.2.0][okio_3_2_0]. ## Version 5.0.0-alpha.9 _2022-06-16_ * New: Enforce label length limits in URLs. `HttpUrl` now rejects URLs whose domains aren't valid. This includes overly-long domain names (longer than 253 characters), overly-long labels (more than 63 characters between dots), and empty labels.
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Dec 05 16:02:59 UTC 2025 - 36.2K bytes - Viewed (2)