Replaced 403 status code with 401 ; as 403 represents correct authentication but incorrect authorization.
And the cases here are about missing creds in auth headers so 401 makes more sense.
The response body is displaying the correct message but the response status code was 403.
* 🔧 Update pre-commit, use ruff format
* ⬆️ Upgrade dependencies, use Ruff for formatting
* 🔧 Update Ruff config
* 🔨 Update lint and format scripts, use Ruff
* 🎨 Format internals with Ruff
* 🎨 Format docs scripts
* 🎨 Format tests
* 🎨 Format extra commas in src for docs
* 📝 Update docs mentioning `@lru_cache()`, use `@lru_cache` instead to keep consistency with the format
* 🎨 Update src for docs, use plain `@lru_cache`
* 🎨 Update src for docs format and docs references
* ➕ 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
* Update isort script to match changes in the new release, isort v5.0.2
* Downgrade isort to version v4.3.21
* Add an alternative flag to --recursive in isort v5.0.2
* Add isort config file
* 🚚 Import from docs_src for tests
* 🎨 Format dependencies.utils
* 🎨 Remove isort combine_as_imports, keep black profile
* 🔧 Update isort config, use pyproject.toml, Black profile
* 🔧 Update format scripts to use explicit directories to format
otherwise it would try to format venv env directories, I have several with different Python versions
* 🎨 Format NoSQL tutorial after re-sorting imports
* 🎨 Fix format for __init__.py
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>