Browse Source

Remove code examples for Python 3.8 in `conditional_openapi`

pull/14510/head
Yurii Motov 7 months ago
parent
commit
ed47da49b3
  1. 2
      docs/en/docs/how-to/conditional-openapi.md
  2. 0
      docs_src/conditional_openapi/tutorial001_py39.py
  3. 6
      tests/test_tutorial/test_conditional_openapi/test_tutorial001.py

2
docs/en/docs/how-to/conditional-openapi.md

@ -29,7 +29,7 @@ You can easily use the same Pydantic settings to configure your generated OpenAP
For example: For example:
{* ../../docs_src/conditional_openapi/tutorial001.py hl[6,11] *} {* ../../docs_src/conditional_openapi/tutorial001_py39.py hl[6,11] *}
Here we declare the setting `openapi_url` with the same default of `"/openapi.json"`. Here we declare the setting `openapi_url` with the same default of `"/openapi.json"`.

0
docs_src/conditional_openapi/tutorial001.py → docs_src/conditional_openapi/tutorial001_py39.py

6
tests/test_tutorial/test_conditional_openapi/test_tutorial001.py

@ -6,11 +6,11 @@ from ...utils import needs_pydanticv2
def get_client() -> TestClient: def get_client() -> TestClient:
from docs_src.conditional_openapi import tutorial001 from docs_src.conditional_openapi import tutorial001_py39
importlib.reload(tutorial001) importlib.reload(tutorial001_py39)
client = TestClient(tutorial001.app) client = TestClient(tutorial001_py39.app)
return client return client

Loading…
Cancel
Save