- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for json_schema_extra (0.06 sec)
-
fastapi/params.py
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
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/schema_extra_example/tutorial001_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 684 bytes - Viewed (0) -
tests/test_custom_schema_fields.py
app = FastAPI() class Item(BaseModel): name: str description: Annotated[ Optional[str], WithJsonSchema({"type": ["string", "null"]}) ] = None model_config = { "json_schema_extra": { "x-something-internal": {"level": 4}, } } @app.get("/foo", response_model=Item) def foo(): return {"name": "Foo item"} client = TestClient(app)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 1.3K bytes - Viewed (0) -
tests/test_response_by_alias.py
app = FastAPI() class Model(BaseModel): name: str = Field(alias="alias") class ModelNoAlias(BaseModel): name: str model_config = ConfigDict( json_schema_extra={ "description": ( "response_model_by_alias=False is basically a quick hack, to support " "proper OpenAPI use another model with the correct field names" )
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 10.7K bytes - Viewed (0) -
fastapi/security/oauth2.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 22K bytes - Viewed (0) -
docs/en/docs/tutorial/schema-extra-example.md
You can use the attribute `model_config` that takes a `dict` as described in <a href="https://docs.pydantic.dev/latest/api/config/" class="external-link" target="_blank">Pydantic's docs: Configuration</a>. You can set `"json_schema_extra"` with a `dict` containing any additional data you would like to show up in the generated JSON Schema, including `examples`. /// tip
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 8.9K bytes - Viewed (0) -
docs/de/docs/tutorial/schema-extra-example.md
Sie können `json_schema_extra` setzen, mit einem `dict`, das alle zusätzlichen Daten enthält, die im generierten JSON-Schema angezeigt werden sollen, einschließlich `examples`. /// tip | Tipp
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 24 10:28:19 UTC 2025 - 10.6K bytes - Viewed (0) -
docs/es/docs/tutorial/schema-extra-example.md
Puedes establecer `"json_schema_extra"` con un `dict` que contenga cualquier dato adicional que desees que aparezca en el JSON Schema generado, incluyendo `examples`. //// //// tab | Pydantic v1
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 16:33:45 UTC 2025 - 10.3K bytes - Viewed (0) -
tests/test_schema_extra_examples.py
from pydantic import BaseModel, ConfigDict def create_app(): app = FastAPI() class Item(BaseModel): data: str model_config = ConfigDict( json_schema_extra={"example": {"data": "Data in schema_extra"}} ) @app.post("/schema_extra/") def schema_extra(item: Item): return item with pytest.warns(FastAPIDeprecationWarning):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 32.2K bytes - Viewed (0)