- Sort Score
- Num 10 results
- Language All
Results 151 - 160 of 349 for unionOf (0.09 seconds)
-
docs_src/cookie_params/tutorial001_py39.py
from typing import Union from fastapi import Cookie, FastAPI app = FastAPI() @app.get("/items/") async def read_items(ads_id: Union[str, None] = Cookie(default=None)):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 202 bytes - Click Count (0) -
docs_src/header_params/tutorial001_py39.py
from typing import Union from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items(user_agent: Union[str, None] = Header(default=None)):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 214 bytes - Click Count (0) -
tests/test_openapi_examples.py
from typing import Union from fastapi import Body, Cookie, FastAPI, Header, Path, Query from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Item(BaseModel): data: str @app.post("/examples/") def examples( item: Item = Body( examples=[ {"data": "Data in Body examples, example1"}, ], openapi_examples={ "Example One": {
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 15.1K bytes - Click Count (0) -
docs_src/header_params/tutorial002_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items( strange_header: Annotated[ Union[str, None], Header(convert_underscores=False) ] = None, ):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 288 bytes - Click Count (0) -
docs_src/header_params/tutorial003_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items(x_token: Annotated[Union[list[str], None], Header()] = None):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 234 bytes - Click Count (0) -
tests/test_pydantic_v1_error.py
def test_raises_pydantic_v1_model_in_union() -> None: class ModelV1A(BaseModel): name: str app = FastAPI() with pytest.raises(PydanticV1NotSupportedError): @app.post("/union") def endpoint(data: Union[dict, ModelV1A]): # pragma: no cover return data def test_raises_pydantic_v1_model_in_sequence() -> None: class ModelV1A(BaseModel): name: str app = FastAPI()
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 2.3K bytes - Click Count (0) -
src/main/java/jcifs/smb1/dcerpc/msrpc/srvsvc.idl
typedef struct { int count; [size_is(count)] ShareInfo502 *array; } ShareInfoCtr502; typedef [switch_type(int)] union { [case(0)] ShareInfo0 *info0; [case(1)] ShareInfo1 *info1; [case(502)] ShareInfo502 *info1; } ShareInfo; typedef [switch_type(int)] union { [case(0)] ShareInfoCtr0 *info0; [case(1)] ShareInfoCtr1 *info1; [case(502)] ShareInfoCtr502 *info1; } ShareCtr; [op(0x0f)]Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Fri Mar 22 20:39:42 GMT 2019 - 2.2K bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial006c_an_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Feb 15 16:23:59 GMT 2025 - 314 bytes - Click Count (0) -
docs_src/app_testing/app_b_py39/main.py
from typing import Union from fastapi import FastAPI, Header, HTTPException from pydantic import BaseModel fake_secret_token = "coneofsilence" fake_db = { "foo": {"id": "foo", "title": "Foo", "description": "There goes my hero"}, "bar": {"id": "bar", "title": "Bar", "description": "The bartenders"}, } app = FastAPI() class Item(BaseModel): id: str title: str description: Union[str, None] = None
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.1K bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial004_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[ Union[str, None], Query(min_length=3, max_length=50, pattern="^fixedquery$") ] = None, ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 381 bytes - Click Count (0)