Commit Graph

6 Commits

Author SHA1 Message Date
pre-commit-ci-lite[bot] 85b156c180
🎨 Auto format 2025-12-14 09:03:51 +00:00
majiayu000 b8a617d62f Update ValidationError schema for Pydantic V2 compatibility
Add input, ctx, and url fields to the ValidationError OpenAPI definition
to accurately reflect the actual error structure returned by Pydantic V2.

Pydantic V2 validation errors include additional fields:
- input: The value that failed validation
- ctx: Additional context about the error (optional)
- url: Documentation URL for the error type (optional)

Fixes #10787
2025-12-14 17:02:12 +08:00
Sebastián Ramírez c411b81c29
Update internal tests for latest Pydantic, including CI tweaks to install the latest Pydantic (#12147) 2024-09-06 15:57:43 +00:00
Sebastián Ramírez 2e14c69c31
👷 Adopt Ruff format (#10517)
* 🔧 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
2023-10-25 00:26:06 +04:00
Sebastián Ramírez 37d46e6b6c
Add missing test for OpenAPI examples, it was missing in coverage (#10188)
 Add missing test for OpenAPI examples, it seems it was discovered in coverage by an upgrade in AnyIO
2023-09-01 23:36:08 +02:00
Sebastián Ramírez 1b714b3177
Add support for `openapi_examples` in all FastAPI parameters (#10152)
* ♻️ Refactor model for OpenAPI Examples to use a reusable TypedDict

*  Add support for openapi_examples in parameters

* 📝 Add new docs examples for new parameter openapi_examples

* 📝 Update docs for Schema Extra to include OpenAPI examples

*  Add tests for new source examples, for openapi_examples

*  Add tests for openapi_examples corner cases and all parameters

* 💡 Tweak and ignore type annotation checks for custom TypedDict
2023-08-26 20:03:13 +02:00