- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for json_schema_extra (0.06 sec)
-
docs_src/schema_extra_example/tutorial001_py310.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 646 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) -
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)