]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commit
✨ Add reference (code API) docs with PEP 727, add subclass with custom docstrings...
authorSebastián Ramírez <tiangolo@gmail.com>
Wed, 18 Oct 2023 12:36:40 +0000 (16:36 +0400)
committerGitHub <noreply@github.com>
Wed, 18 Oct 2023 12:36:40 +0000 (16:36 +0400)
commit05ca41cfd1c56157cf5bd2b3c1958263bdd71611
treec579a92e365e5ecbc59997850c697d37b92ca3a8
parent3fa44aabe37362d4640403d9571897ea7dd5cf9b
✨ Add reference (code API) docs with PEP 727, add subclass with custom docstrings for `BackgroundTasks`, refactor docs structure (#10392)

* ➕ Add mkdocstrings and griffe-typingdoc to dependencies

* 🔧 Add mkdocstrings configs to MkDocs

* 📝 Add first WIP reference page

* ⬆️ Upgrade typing-extensions to the minimum version including Doc()

* 📝 Add docs to FastAPI parameters

* 📝 Add docstrings for OpenAPI docs utils

* 📝 Add docstrings for security utils

* 📝 Add docstrings for UploadFile

* 📝 Update docstrings in FastAPI class

* 📝 Add docstrings for path operation methods

* 📝 Add docstring for jsonable_encoder

* 📝 Add docstrings for exceptions

* 📝 Add docstsrings for parameter functions

* 📝 Add docstrings for responses

* 📝 Add docstrings for APIRouter

* ♻️ Sub-class BackgroundTasks to document it with docstrings

* 📝 Update usage of background tasks in dependencies

* ✅ Update tests with new deprecation warnings

* 📝 Add new reference docs

* 🔧 Update MkDocs with new reference docs

* ✅ Update pytest fixture, deprecation is raised only once

* 🎨 Update format for types in exceptions.py

* ♻️ Update annotations in BackgroundTask, `Annotated` can't take ParamSpec's P.args or P.kwargs

* ✏️ Fix typos caught by @pawamoy

* 🔧 Update and fix MkDocstrings configs from @pawamoy tips

* 📝 Update reference docs

* ✏️ Fix typos found by @pawamoy

* ➕ Add HTTPX as a dependency for docs, for the TestClient

* 🔧 Update MkDocs config, rename websockets reference

* 🔇 Add type-ignores for Doc as the stubs haven't been released for mypy

* 🔥 Remove duplicated deprecated notice

* 🔇 Remove typing error for unreleased stub in openapi/docs.py

* ✅ Add tests for UploadFile for coverage

* ⬆️ Upgrade griffe-typingdoc==0.2.2

* 📝 Refactor docs structure

* 🔨 Update README generation with new index frontmatter and style

* 🔨 Update generation of languages, remove from top menu, keep in lang menu

* 📝 Add OpenAPI Pydantic models

* 🔨 Update docs script to not translate Reference and Release Notes

* 🔧 Add reference for OpenAPI models

* 🔧 Update MkDocs config for mkdocstrings insiders

* 👷 Install mkdocstring insiders in CI for docs

* 🐛 Fix MkDocstrings insiders install URL

* ➕ Move dependencies shared by docs and tests to its own requirements file

* 👷 Update cache keys for test and docs dependencies

* 📝 Remove no longer needed __init__ placeholder docstrings

* 📝 Move docstring for APIRouter to the class level (not __init__ level)

* 🔥 Remove no longer needed dummy placeholder __init__ docstring
60 files changed:
.github/workflows/build-docs.yml
.github/workflows/test.yml
docs/en/docs/about/index.md [new file with mode: 0644]
docs/en/docs/fastapi-people.md
docs/en/docs/features.md
docs/en/docs/help/index.md [new file with mode: 0644]
docs/en/docs/index.md
docs/en/docs/learn/index.md [new file with mode: 0644]
docs/en/docs/reference/apirouter.md [new file with mode: 0644]
docs/en/docs/reference/background.md [new file with mode: 0644]
docs/en/docs/reference/dependencies.md [new file with mode: 0644]
docs/en/docs/reference/encoders.md [new file with mode: 0644]
docs/en/docs/reference/exceptions.md [new file with mode: 0644]
docs/en/docs/reference/fastapi.md [new file with mode: 0644]
docs/en/docs/reference/httpconnection.md [new file with mode: 0644]
docs/en/docs/reference/index.md [new file with mode: 0644]
docs/en/docs/reference/middleware.md [new file with mode: 0644]
docs/en/docs/reference/openapi/docs.md [new file with mode: 0644]
docs/en/docs/reference/openapi/index.md [new file with mode: 0644]
docs/en/docs/reference/openapi/models.md [new file with mode: 0644]
docs/en/docs/reference/parameters.md [new file with mode: 0644]
docs/en/docs/reference/request.md [new file with mode: 0644]
docs/en/docs/reference/response.md [new file with mode: 0644]
docs/en/docs/reference/responses.md [new file with mode: 0644]
docs/en/docs/reference/security/index.md [new file with mode: 0644]
docs/en/docs/reference/staticfiles.md [new file with mode: 0644]
docs/en/docs/reference/status.md [new file with mode: 0644]
docs/en/docs/reference/templating.md [new file with mode: 0644]
docs/en/docs/reference/testclient.md [new file with mode: 0644]
docs/en/docs/reference/uploadfile.md [new file with mode: 0644]
docs/en/docs/reference/websockets.md [new file with mode: 0644]
docs/en/docs/release-notes.md
docs/en/docs/resources/index.md [new file with mode: 0644]
docs/en/mkdocs.yml
fastapi/applications.py
fastapi/background.py
fastapi/datastructures.py
fastapi/dependencies/utils.py
fastapi/encoders.py
fastapi/exceptions.py
fastapi/openapi/docs.py
fastapi/param_functions.py
fastapi/responses.py
fastapi/routing.py
fastapi/security/api_key.py
fastapi/security/http.py
fastapi/security/oauth2.py
fastapi/security/open_id_connect_url.py
pyproject.toml
requirements-docs-tests.txt [new file with mode: 0644]
requirements-docs.txt
requirements-tests.txt
scripts/docs.py
scripts/mkdocs_hooks.py
tests/test_datastructures.py
tests/test_router_events.py
tests/test_tutorial/test_async_sql_databases/test_tutorial001.py
tests/test_tutorial/test_events/test_tutorial001.py
tests/test_tutorial/test_events/test_tutorial002.py
tests/test_tutorial/test_testing/test_tutorial003.py