]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commit
✨ Add support for disabling the separation of input and output JSON Schemas in OpenAP...
authorSebastián Ramírez <tiangolo@gmail.com>
Fri, 25 Aug 2023 19:10:22 +0000 (21:10 +0200)
committerGitHub <noreply@github.com>
Fri, 25 Aug 2023 19:10:22 +0000 (21:10 +0200)
commitea43f227e5c7128c09e3e2d5dceea212552b19dc
tree6be41f9131a3b98f31b855d384dcb4ba8550006c
parent10a127ea4adfe59b7d275fa0bc764b23910aea5c
✨ Add support for disabling the separation of input and output JSON Schemas in OpenAPI with Pydantic v2 (#10145)

* 📝 Add docs for Separate OpenAPI Schemas for Input and Output

* 🔧 Add new docs page to MkDocs config

* ✨ Add separate_input_output_schemas parameter to FastAPI class

* 📝 Add source examples for separating OpenAPI schemas

* ✅ Add tests for separated OpenAPI schemas

* 📝 Add source examples for Python 3.10, 3.9, and 3.7+

* 📝 Update docs for Separate OpenAPI Schemas with new multi-version examples

* ✅ Add and update tests for different Python versions

* ✅ Add tests for corner cases with separate_input_output_schemas

* 📝 Update tutorial to use Union instead of Optional

* 🐛 Fix type annotations

* 🐛 Fix correct import in test

* 💄 Add CSS to simulate browser windows for screenshots

* ➕ Add playwright as a dev dependency to automate generating screenshots

* 🔨 Add Playwright scripts to generate screenshots for new docs

* 📝 Update docs, tweak text to match screenshots

* 🍱 Add screenshots for new docs
31 files changed:
docs/en/docs/css/custom.css
docs/en/docs/how-to/separate-openapi-schemas.md [new file with mode: 0644]
docs/en/docs/img/tutorial/separate-openapi-schemas/image01.png [new file with mode: 0644]
docs/en/docs/img/tutorial/separate-openapi-schemas/image02.png [new file with mode: 0644]
docs/en/docs/img/tutorial/separate-openapi-schemas/image03.png [new file with mode: 0644]
docs/en/docs/img/tutorial/separate-openapi-schemas/image04.png [new file with mode: 0644]
docs/en/docs/img/tutorial/separate-openapi-schemas/image05.png [new file with mode: 0644]
docs/en/mkdocs.yml
docs_src/separate_openapi_schemas/tutorial001.py [new file with mode: 0644]
docs_src/separate_openapi_schemas/tutorial001_py310.py [new file with mode: 0644]
docs_src/separate_openapi_schemas/tutorial001_py39.py [new file with mode: 0644]
docs_src/separate_openapi_schemas/tutorial002.py [new file with mode: 0644]
docs_src/separate_openapi_schemas/tutorial002_py310.py [new file with mode: 0644]
docs_src/separate_openapi_schemas/tutorial002_py39.py [new file with mode: 0644]
fastapi/_compat.py
fastapi/applications.py
fastapi/openapi/utils.py
requirements.txt
scripts/playwright/separate_openapi_schemas/image01.py [new file with mode: 0644]
scripts/playwright/separate_openapi_schemas/image02.py [new file with mode: 0644]
scripts/playwright/separate_openapi_schemas/image03.py [new file with mode: 0644]
scripts/playwright/separate_openapi_schemas/image04.py [new file with mode: 0644]
scripts/playwright/separate_openapi_schemas/image05.py [new file with mode: 0644]
tests/test_openapi_separate_input_output_schemas.py [new file with mode: 0644]
tests/test_tutorial/test_separate_openapi_schemas/__init__.py [new file with mode: 0644]
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial001.py [new file with mode: 0644]
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial001_py310.py [new file with mode: 0644]
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial001_py39.py [new file with mode: 0644]
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002.py [new file with mode: 0644]
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002_py310.py [new file with mode: 0644]
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002_py39.py [new file with mode: 0644]