- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for default_factory (0.07 sec)
-
fastapi/params.py
) self.example = example self.include_in_schema = include_in_schema self.openapi_examples = openapi_examples kwargs = dict( default=default, default_factory=default_factory, alias=alias, title=title, description=description, gt=gt, ge=ge, lt=lt, le=le, min_length=min_length,Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 26.3K bytes - Viewed (0) -
fastapi/param_functions.py
item_id: Annotated[int, Path(title="The ID of the item to get")], ): return {"item_id": item_id} ``` """ return params.Path( default=default, default_factory=default_factory, alias=alias, alias_priority=alias_priority, validation_alias=validation_alias, serialization_alias=serialization_alias, title=title,
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 63K bytes - Viewed (0) -
docs_src/dataclasses_/tutorial002_py39.py
from dataclasses import dataclass, field from typing import Union from fastapi import FastAPI @dataclass class Item: name: str price: float tags: list[str] = field(default_factory=list) description: Union[str, None] = None tax: Union[float, None] = None app = FastAPI() @app.get("/items/next", response_model=Item) async def read_next_item(): return { "name": "Island In The Moon",Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 543 bytes - Viewed (0) -
docs_src/dataclasses_/tutorial002_py310.py
from dataclasses import dataclass, field from fastapi import FastAPI @dataclass class Item: name: str price: float tags: list[str] = field(default_factory=list) description: str | None = None tax: float | None = None app = FastAPI() @app.get("/items/next", response_model=Item) async def read_next_item(): return { "name": "Island In The Moon", "price": 12.99,Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 506 bytes - Viewed (0) -
docs_src/dataclasses_/tutorial003_py310.py
from pydantic.dataclasses import dataclass # (2) @dataclass class Item: name: str description: str | None = None @dataclass class Author: name: str items: list[Item] = field(default_factory=list) # (3) app = FastAPI() @app.post("/authors/{author_id}/items/", response_model=Author) # (4) async def create_author_items(author_id: str, items: list[Item]): # (5)Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 1.3K bytes - Viewed (0) -
docs_src/dataclasses_/tutorial003_py39.py
from pydantic.dataclasses import dataclass # (2) @dataclass class Item: name: str description: Union[str, None] = None @dataclass class Author: name: str items: list[Item] = field(default_factory=list) # (3) app = FastAPI() @app.post("/authors/{author_id}/items/", response_model=Author) # (4) async def create_author_items(author_id: str, items: list[Item]): # (5)Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 1.4K bytes - Viewed (0) -
fastapi/_compat/v2.py
UndefinedType = PydanticUndefinedType evaluate_forwardref = eval_type_lenient Validator = Any # TODO: remove when dropping support for Pydantic < v2.12.3 _Attrs = { "default": ..., "default_factory": None, "alias": None, "alias_priority": None, "validation_alias": None, "serialization_alias": None, "title": None, "field_title_generator": None, "description": None,
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 19.1K bytes - Viewed (0) -
docs/en/docs/release-notes.md
* ✨ Add OpenAPI `external_docs` parameter to `FastAPI`. PR [#13713](https://github.com/fastapi/fastapi/pull/13713) by [@cmtoro](https://github.com/cmtoro). ### Fixes * ⚡️ Fix `default_factory` for response model field with Pydantic V1. PR [#9704](https://github.com/fastapi/fastapi/pull/9704) by [@vvanglro](https://github.com/vvanglro).
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 19:06:15 UTC 2025 - 586.7K bytes - Viewed (0)