mirror of https://github.com/tiangolo/fastapi.git
Remove code examples for Python 3.8 in `additional-responses`
This commit is contained in:
parent
4f3e749d02
commit
2e6de5cd04
|
|
@ -26,7 +26,7 @@ Each of those response `dict`s can have a key `model`, containing a Pydantic mod
|
|||
|
||||
For example, to declare another response with a status code `404` and a Pydantic model `Message`, you can write:
|
||||
|
||||
{* ../../docs_src/additional_responses/tutorial001.py hl[18,22] *}
|
||||
{* ../../docs_src/additional_responses/tutorial001_py39.py hl[18,22] *}
|
||||
|
||||
/// note
|
||||
|
||||
|
|
@ -203,7 +203,7 @@ For example, you can declare a response with a status code `404` that uses a Pyd
|
|||
|
||||
And a response with a status code `200` that uses your `response_model`, but includes a custom `example`:
|
||||
|
||||
{* ../../docs_src/additional_responses/tutorial003.py hl[20:31] *}
|
||||
{* ../../docs_src/additional_responses/tutorial003_py39.py hl[20:31] *}
|
||||
|
||||
It will all be combined and included in your OpenAPI, and shown in the API docs:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from fastapi.testclient import TestClient
|
||||
|
||||
from docs_src.additional_responses.tutorial001 import app
|
||||
from docs_src.additional_responses.tutorial001_py39 import app
|
||||
|
||||
client = TestClient(app)
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ from tests.utils import needs_py310
|
|||
@pytest.fixture(
|
||||
name="client",
|
||||
params=[
|
||||
pytest.param("tutorial002"),
|
||||
pytest.param("tutorial002_py39"),
|
||||
pytest.param("tutorial002_py310", marks=needs_py310),
|
||||
],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from fastapi.testclient import TestClient
|
||||
|
||||
from docs_src.additional_responses.tutorial003 import app
|
||||
from docs_src.additional_responses.tutorial003_py39 import app
|
||||
|
||||
client = TestClient(app)
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ from tests.utils import needs_py310
|
|||
@pytest.fixture(
|
||||
name="client",
|
||||
params=[
|
||||
pytest.param("tutorial004"),
|
||||
pytest.param("tutorial004_py39"),
|
||||
pytest.param("tutorial004_py310", marks=needs_py310),
|
||||
],
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue