fastapi-validation-override 1.2.2__tar.gz → 1.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/.github/workflows/bump-pre-commit-hooks.yml +2 -2
  2. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/.github/workflows/create-draft-release.yml +1 -1
  3. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/.github/workflows/pre-commit.yml +1 -1
  4. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/.github/workflows/prepare-release.yml +1 -1
  5. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/.github/workflows/publish.yml +1 -1
  6. fastapi_validation_override-1.2.4/.github/workflows/test-fastapi-main.yml +52 -0
  7. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/.github/workflows/test.yml +9 -4
  8. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/PKG-INFO +21 -21
  9. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/README.md +15 -15
  10. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/fastapi_validation_override/__init__.py +1 -1
  11. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/pyproject.toml +16 -9
  12. fastapi_validation_override-1.2.4/release-notes.md +189 -0
  13. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/tests/test_overrider.py +98 -102
  14. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/uv.lock +93 -79
  15. fastapi_validation_override-1.2.2/release-notes.md +0 -166
  16. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/.github/dependabot.yml +0 -0
  17. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/.github/latest-changes.yml +0 -0
  18. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/.github/workflows/detect-conflicts.yml +0 -0
  19. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/.github/workflows/guard-dependencies.yml +0 -0
  20. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/.github/workflows/test-redistribute.yml +0 -0
  21. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/.github/workflows/zizmor.yml +0 -0
  22. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/.gitignore +0 -0
  23. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/.pre-commit-config.yaml +0 -0
  24. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/.python-version +0 -0
  25. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/LICENSE +0 -0
  26. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/examples/basic.py +0 -0
  27. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/examples/custom_422_response.py +0 -0
  28. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/examples/custom_openapi.py +0 -0
  29. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/examples/custom_status_code.py +0 -0
  30. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/examples/custom_validation_schema.py +0 -0
  31. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/examples/existing_response_at_target_code.py +0 -0
  32. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/examples/handle_exceptions_false.py +0 -0
  33. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/examples/webhooks_and_callbacks.py +0 -0
  34. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/examples/with_apirouter.py +0 -0
  35. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/fastapi_validation_override/overrider.py +0 -0
  36. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/fastapi_validation_override/py.typed +0 -0
  37. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/scripts/format.sh +0 -0
  38. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/scripts/lint.sh +0 -0
  39. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/scripts/prepare_release.py +0 -0
  40. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/scripts/test-cov-html.sh +0 -0
  41. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/scripts/test-cov.sh +0 -0
  42. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/scripts/test.sh +0 -0
  43. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/tests/__init__.py +0 -0
  44. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/tests/test_examples.py +0 -0
  45. {fastapi_validation_override-1.2.2 → fastapi_validation_override-1.2.4}/tests/test_prepare_release.py +0 -0
@@ -9,7 +9,7 @@ permissions: {}
9
9
 
10
10
  jobs:
11
11
  bump-pre-commit-hooks:
12
- if: github.repository_owner == 'mat81black'
12
+ if: github.repository_owner == 'matblack81'
13
13
  runs-on: ubuntu-latest
14
14
  timeout-minutes: 10
15
15
  steps:
@@ -25,7 +25,7 @@ jobs:
25
25
  with:
26
26
  python-version-file: ".python-version"
27
27
  - name: Setup uv
28
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v9.0.0 #sync-pin:setup-uv
28
+ uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v9.0.0 #sync-pin:setup-uv
29
29
  with:
30
30
  # Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
31
31
  # See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
@@ -31,7 +31,7 @@ jobs:
31
31
  with:
32
32
  python-version-file: ".python-version"
33
33
  - name: Install uv
34
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v9.0.0 #sync-pin:setup-uv
34
+ uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v9.0.0 #sync-pin:setup-uv
35
35
  with:
36
36
  # Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
37
37
  # See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
@@ -30,7 +30,7 @@ jobs:
30
30
  python-version-file: ".python-version"
31
31
 
32
32
  - name: Setup uv
33
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v9.0.0 #sync-pin:setup-uv
33
+ uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v9.0.0 #sync-pin:setup-uv
34
34
  with:
35
35
  # Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
36
36
  # See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
@@ -42,7 +42,7 @@ jobs:
42
42
  with:
43
43
  python-version-file: ".python-version"
44
44
  - name: Install uv
45
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v9.0.0 #sync-pin:setup-uv
45
+ uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v9.0.0 #sync-pin:setup-uv
46
46
  with:
47
47
  # Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
48
48
  # See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
@@ -28,7 +28,7 @@ jobs:
28
28
  with:
29
29
  python-version-file: ".python-version"
30
30
  - name: Install uv
31
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v9.0.0 #sync-pin:setup-uv
31
+ uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v9.0.0 #sync-pin:setup-uv
32
32
  with:
33
33
  # Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
34
34
  # See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
@@ -0,0 +1,52 @@
1
+ name: Test FastAPI main
2
+
3
+ # Early warning, not a gate: runs the suite against FastAPI's development branch so that
4
+ # changes to validation errors or OpenAPI generation show up before they are released.
5
+ # Never runs on pull requests and is not part of any required check.
6
+ on:
7
+ schedule:
8
+ # cron every day: FastAPI often releases what lands on master within hours
9
+ - cron: "0 3 * * *"
10
+ workflow_dispatch:
11
+
12
+ permissions: {}
13
+
14
+ env:
15
+ UV_NO_SYNC: true
16
+
17
+ jobs:
18
+ test-fastapi-main:
19
+ runs-on: ubuntu-latest
20
+ timeout-minutes: 15
21
+ env:
22
+ UV_PYTHON: "3.14"
23
+
24
+ steps:
25
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 #sync-pin:checkout
26
+ with:
27
+ persist-credentials: false
28
+
29
+ - name: Set up Python
30
+ uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 #sync-pin:setup-python
31
+ with:
32
+ python-version: "3.14"
33
+
34
+ - name: Setup uv
35
+ uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v9.0.0 #sync-pin:setup-uv
36
+ with:
37
+ # Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
38
+ # See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
39
+ version: "0.11.18"
40
+ enable-cache: true
41
+ cache-dependency-glob: |
42
+ pyproject.toml
43
+ uv.lock
44
+
45
+ - name: Install Dependencies
46
+ run: uv sync
47
+
48
+ - name: Install FastAPI from source
49
+ run: uv pip install -U "git+https://github.com/fastapi/fastapi@master"
50
+
51
+ - name: Test
52
+ run: uv run --no-sync bash scripts/test.sh
@@ -80,7 +80,7 @@ jobs:
80
80
  python-version: ${{ matrix.python-version }}
81
81
 
82
82
  - name: Setup uv
83
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v9.0.0 #sync-pin:setup-uv
83
+ uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v9.0.0 #sync-pin:setup-uv
84
84
  with:
85
85
  # Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
86
86
  # See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
@@ -98,6 +98,11 @@ jobs:
98
98
  if: matrix.fastapi-version != 'latest'
99
99
  run: uv pip install "fastapi==${{ matrix.fastapi-version }}"
100
100
 
101
+ # Without this, "latest" is whatever uv.lock pins, and only moves when Dependabot does.
102
+ - name: Upgrade to the latest FastAPI
103
+ if: matrix.fastapi-version == 'latest'
104
+ run: uv pip install -U fastapi
105
+
101
106
  - name: Prepare coverage dir
102
107
  run: mkdir coverage
103
108
 
@@ -168,7 +173,7 @@ jobs:
168
173
 
169
174
  - name: Setup uv
170
175
  if: steps.changed-tests.outputs.found == 'true'
171
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v9.0.0 #sync-pin:setup-uv-2
176
+ uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v9.0.0 #sync-pin:setup-uv-2
172
177
  with:
173
178
  # Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
174
179
  # See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
@@ -210,7 +215,7 @@ jobs:
210
215
  persist-credentials: false
211
216
 
212
217
  - name: Setup uv
213
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v9.0.0 #sync-pin:setup-uv-3
218
+ uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v9.0.0 #sync-pin:setup-uv-3
214
219
  with:
215
220
  # Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
216
221
  # See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
@@ -243,7 +248,7 @@ jobs:
243
248
  include-hidden-files: true
244
249
 
245
250
  - name: Upload coverage to Codecov
246
- uses: codecov/codecov-action@0b35c9ecc4f0529d0eb674914510c22f85b196b4 # v7.0.0 #sync-pin:codecov-action
251
+ uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.0.0 #sync-pin:codecov-action
247
252
  with:
248
253
  token: ${{ secrets.CODECOV_TOKEN }}
249
254
  files: coverage.xml
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: fastapi-validation-override
3
- Version: 1.2.2
3
+ Version: 1.2.4
4
4
  Summary: Override FastAPI's default 422 validation error with any HTTP status code, at runtime and in the OpenAPI schema.
5
- Project-URL: Homepage, https://github.com/mat81black/fastapi-validation-override
6
- Project-URL: Repository, https://github.com/mat81black/fastapi-validation-override
7
- Project-URL: Issues, https://github.com/mat81black/fastapi-validation-override/issues
8
- Project-URL: Documentation, https://github.com/mat81black/fastapi-validation-override#readme
9
- Project-URL: Changelog, https://github.com/mat81black/fastapi-validation-override/blob/main/release-notes.md
5
+ Project-URL: Homepage, https://github.com/matblack81/fastapi-validation-override
6
+ Project-URL: Repository, https://github.com/matblack81/fastapi-validation-override
7
+ Project-URL: Issues, https://github.com/matblack81/fastapi-validation-override/issues
8
+ Project-URL: Documentation, https://github.com/matblack81/fastapi-validation-override#readme
9
+ Project-URL: Changelog, https://github.com/matblack81/fastapi-validation-override/blob/main/release-notes.md
10
10
  Author-email: Matteo Nieddu <mat81black@gmail.com>
11
11
  License-Expression: MIT
12
12
  License-File: LICENSE
@@ -31,11 +31,11 @@ Description-Content-Type: text/markdown
31
31
 
32
32
  # FastAPI Validation Override
33
33
 
34
- [![Build Status](https://github.com/mat81black/fastapi-validation-override/workflows/Test/badge.svg)](https://github.com/mat81black/fastapi-validation-override/actions)
35
- [![codecov](https://codecov.io/github/mat81black/fastapi-validation-override/graph/badge.svg?token=SL4JPWAB0O)](https://codecov.io/github/mat81black/fastapi-validation-override)
34
+ [![Build Status](https://github.com/matblack81/fastapi-validation-override/workflows/Test/badge.svg)](https://github.com/matblack81/fastapi-validation-override/actions)
35
+ [![codecov](https://codecov.io/github/matblack81/fastapi-validation-override/graph/badge.svg?token=SL4JPWAB0O)](https://codecov.io/github/matblack81/fastapi-validation-override)
36
36
  [![pypi package](https://img.shields.io/pypi/v/fastapi-validation-override?color=%2334D058&label=pypi%20package)](https://pypi.org/project/fastapi-validation-override/)
37
37
  [![Supported Python versions](https://img.shields.io/pypi/pyversions/fastapi-validation-override.svg?color=%2334D058)](https://pypi.org/project/fastapi-validation-override/)
38
- [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/mat81black/fastapi-validation-override/blob/main/LICENSE)
38
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/matblack81/fastapi-validation-override/blob/main/LICENSE)
39
39
 
40
40
  FastAPI returns 422 Unprocessable Entity for every request validation failure. Many APIs, client teams, and HTTP standards treat 400 Bad Request as the correct status code for malformed input. Fixing this in FastAPI requires wiring a custom exception handler and updating the OpenAPI schema separately. `override_validation_error` does both in a single call.
41
41
 
@@ -286,24 +286,24 @@ override_validation_error(app)
286
286
 
287
287
  ## Examples
288
288
 
289
- Runnable examples are in the [`examples/`](https://github.com/mat81black/fastapi-validation-override/tree/main/examples) directory. Run any of them from the project root with `uvicorn examples.<name>:app --reload`, e.g. `uvicorn examples.basic:app --reload`, then open `http://127.0.0.1:8000/docs`:
289
+ Runnable examples are in the [`examples/`](https://github.com/matblack81/fastapi-validation-override/tree/main/examples) directory. Run any of them from the project root with `uvicorn examples.<name>:app --reload`, e.g. `uvicorn examples.basic:app --reload`, then open `http://127.0.0.1:8000/docs`:
290
290
 
291
291
  | File | Description |
292
292
  |---|---|
293
- | [`basic.py`](https://github.com/mat81black/fastapi-validation-override/blob/main/examples/basic.py) | Minimal setup with the default 400 status code |
294
- | [`custom_status_code.py`](https://github.com/mat81black/fastapi-validation-override/blob/main/examples/custom_status_code.py) | Using a custom status code (409) |
295
- | [`handle_exceptions_false.py`](https://github.com/mat81black/fastapi-validation-override/blob/main/examples/handle_exceptions_false.py) | Custom exception handler with schema-only patch |
296
- | [`custom_validation_schema.py`](https://github.com/mat81black/fastapi-validation-override/blob/main/examples/custom_validation_schema.py) | Replacing the validation error schema with a custom error envelope |
297
- | [`custom_openapi.py`](https://github.com/mat81black/fastapi-validation-override/blob/main/examples/custom_openapi.py) | Preserving a custom `app.openapi` function |
298
- | [`existing_response_at_target_code.py`](https://github.com/mat81black/fastapi-validation-override/blob/main/examples/existing_response_at_target_code.py) | `anyOf` merge when the target code is already declared |
299
- | [`custom_422_response.py`](https://github.com/mat81black/fastapi-validation-override/blob/main/examples/custom_422_response.py) | Keeping a custom, non-validation 422 response |
300
- | [`with_apirouter.py`](https://github.com/mat81black/fastapi-validation-override/blob/main/examples/with_apirouter.py) | Usage with multiple `APIRouter` instances |
301
- | [`webhooks_and_callbacks.py`](https://github.com/mat81black/fastapi-validation-override/blob/main/examples/webhooks_and_callbacks.py) | Coverage extends to webhooks and callbacks, not just regular paths |
293
+ | [`basic.py`](https://github.com/matblack81/fastapi-validation-override/blob/main/examples/basic.py) | Minimal setup with the default 400 status code |
294
+ | [`custom_status_code.py`](https://github.com/matblack81/fastapi-validation-override/blob/main/examples/custom_status_code.py) | Using a custom status code (409) |
295
+ | [`handle_exceptions_false.py`](https://github.com/matblack81/fastapi-validation-override/blob/main/examples/handle_exceptions_false.py) | Custom exception handler with schema-only patch |
296
+ | [`custom_validation_schema.py`](https://github.com/matblack81/fastapi-validation-override/blob/main/examples/custom_validation_schema.py) | Replacing the validation error schema with a custom error envelope |
297
+ | [`custom_openapi.py`](https://github.com/matblack81/fastapi-validation-override/blob/main/examples/custom_openapi.py) | Preserving a custom `app.openapi` function |
298
+ | [`existing_response_at_target_code.py`](https://github.com/matblack81/fastapi-validation-override/blob/main/examples/existing_response_at_target_code.py) | `anyOf` merge when the target code is already declared |
299
+ | [`custom_422_response.py`](https://github.com/matblack81/fastapi-validation-override/blob/main/examples/custom_422_response.py) | Keeping a custom, non-validation 422 response |
300
+ | [`with_apirouter.py`](https://github.com/matblack81/fastapi-validation-override/blob/main/examples/with_apirouter.py) | Usage with multiple `APIRouter` instances |
301
+ | [`webhooks_and_callbacks.py`](https://github.com/matblack81/fastapi-validation-override/blob/main/examples/webhooks_and_callbacks.py) | Coverage extends to webhooks and callbacks, not just regular paths |
302
302
 
303
303
  ## Release Notes
304
304
 
305
- [RELEASE_NOTES](https://github.com/mat81black/fastapi-validation-override/blob/main/release-notes.md)
305
+ [RELEASE_NOTES](https://github.com/matblack81/fastapi-validation-override/blob/main/release-notes.md)
306
306
 
307
307
  ## License
308
308
 
309
- [MIT](https://github.com/mat81black/fastapi-validation-override/blob/main/LICENSE)
309
+ [MIT](https://github.com/matblack81/fastapi-validation-override/blob/main/LICENSE)
@@ -1,10 +1,10 @@
1
1
  # FastAPI Validation Override
2
2
 
3
- [![Build Status](https://github.com/mat81black/fastapi-validation-override/workflows/Test/badge.svg)](https://github.com/mat81black/fastapi-validation-override/actions)
4
- [![codecov](https://codecov.io/github/mat81black/fastapi-validation-override/graph/badge.svg?token=SL4JPWAB0O)](https://codecov.io/github/mat81black/fastapi-validation-override)
3
+ [![Build Status](https://github.com/matblack81/fastapi-validation-override/workflows/Test/badge.svg)](https://github.com/matblack81/fastapi-validation-override/actions)
4
+ [![codecov](https://codecov.io/github/matblack81/fastapi-validation-override/graph/badge.svg?token=SL4JPWAB0O)](https://codecov.io/github/matblack81/fastapi-validation-override)
5
5
  [![pypi package](https://img.shields.io/pypi/v/fastapi-validation-override?color=%2334D058&label=pypi%20package)](https://pypi.org/project/fastapi-validation-override/)
6
6
  [![Supported Python versions](https://img.shields.io/pypi/pyversions/fastapi-validation-override.svg?color=%2334D058)](https://pypi.org/project/fastapi-validation-override/)
7
- [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/mat81black/fastapi-validation-override/blob/main/LICENSE)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/matblack81/fastapi-validation-override/blob/main/LICENSE)
8
8
 
9
9
  FastAPI returns 422 Unprocessable Entity for every request validation failure. Many APIs, client teams, and HTTP standards treat 400 Bad Request as the correct status code for malformed input. Fixing this in FastAPI requires wiring a custom exception handler and updating the OpenAPI schema separately. `override_validation_error` does both in a single call.
10
10
 
@@ -255,24 +255,24 @@ override_validation_error(app)
255
255
 
256
256
  ## Examples
257
257
 
258
- Runnable examples are in the [`examples/`](https://github.com/mat81black/fastapi-validation-override/tree/main/examples) directory. Run any of them from the project root with `uvicorn examples.<name>:app --reload`, e.g. `uvicorn examples.basic:app --reload`, then open `http://127.0.0.1:8000/docs`:
258
+ Runnable examples are in the [`examples/`](https://github.com/matblack81/fastapi-validation-override/tree/main/examples) directory. Run any of them from the project root with `uvicorn examples.<name>:app --reload`, e.g. `uvicorn examples.basic:app --reload`, then open `http://127.0.0.1:8000/docs`:
259
259
 
260
260
  | File | Description |
261
261
  |---|---|
262
- | [`basic.py`](https://github.com/mat81black/fastapi-validation-override/blob/main/examples/basic.py) | Minimal setup with the default 400 status code |
263
- | [`custom_status_code.py`](https://github.com/mat81black/fastapi-validation-override/blob/main/examples/custom_status_code.py) | Using a custom status code (409) |
264
- | [`handle_exceptions_false.py`](https://github.com/mat81black/fastapi-validation-override/blob/main/examples/handle_exceptions_false.py) | Custom exception handler with schema-only patch |
265
- | [`custom_validation_schema.py`](https://github.com/mat81black/fastapi-validation-override/blob/main/examples/custom_validation_schema.py) | Replacing the validation error schema with a custom error envelope |
266
- | [`custom_openapi.py`](https://github.com/mat81black/fastapi-validation-override/blob/main/examples/custom_openapi.py) | Preserving a custom `app.openapi` function |
267
- | [`existing_response_at_target_code.py`](https://github.com/mat81black/fastapi-validation-override/blob/main/examples/existing_response_at_target_code.py) | `anyOf` merge when the target code is already declared |
268
- | [`custom_422_response.py`](https://github.com/mat81black/fastapi-validation-override/blob/main/examples/custom_422_response.py) | Keeping a custom, non-validation 422 response |
269
- | [`with_apirouter.py`](https://github.com/mat81black/fastapi-validation-override/blob/main/examples/with_apirouter.py) | Usage with multiple `APIRouter` instances |
270
- | [`webhooks_and_callbacks.py`](https://github.com/mat81black/fastapi-validation-override/blob/main/examples/webhooks_and_callbacks.py) | Coverage extends to webhooks and callbacks, not just regular paths |
262
+ | [`basic.py`](https://github.com/matblack81/fastapi-validation-override/blob/main/examples/basic.py) | Minimal setup with the default 400 status code |
263
+ | [`custom_status_code.py`](https://github.com/matblack81/fastapi-validation-override/blob/main/examples/custom_status_code.py) | Using a custom status code (409) |
264
+ | [`handle_exceptions_false.py`](https://github.com/matblack81/fastapi-validation-override/blob/main/examples/handle_exceptions_false.py) | Custom exception handler with schema-only patch |
265
+ | [`custom_validation_schema.py`](https://github.com/matblack81/fastapi-validation-override/blob/main/examples/custom_validation_schema.py) | Replacing the validation error schema with a custom error envelope |
266
+ | [`custom_openapi.py`](https://github.com/matblack81/fastapi-validation-override/blob/main/examples/custom_openapi.py) | Preserving a custom `app.openapi` function |
267
+ | [`existing_response_at_target_code.py`](https://github.com/matblack81/fastapi-validation-override/blob/main/examples/existing_response_at_target_code.py) | `anyOf` merge when the target code is already declared |
268
+ | [`custom_422_response.py`](https://github.com/matblack81/fastapi-validation-override/blob/main/examples/custom_422_response.py) | Keeping a custom, non-validation 422 response |
269
+ | [`with_apirouter.py`](https://github.com/matblack81/fastapi-validation-override/blob/main/examples/with_apirouter.py) | Usage with multiple `APIRouter` instances |
270
+ | [`webhooks_and_callbacks.py`](https://github.com/matblack81/fastapi-validation-override/blob/main/examples/webhooks_and_callbacks.py) | Coverage extends to webhooks and callbacks, not just regular paths |
271
271
 
272
272
  ## Release Notes
273
273
 
274
- [RELEASE_NOTES](https://github.com/mat81black/fastapi-validation-override/blob/main/release-notes.md)
274
+ [RELEASE_NOTES](https://github.com/matblack81/fastapi-validation-override/blob/main/release-notes.md)
275
275
 
276
276
  ## License
277
277
 
278
- [MIT](https://github.com/mat81black/fastapi-validation-override/blob/main/LICENSE)
278
+ [MIT](https://github.com/matblack81/fastapi-validation-override/blob/main/LICENSE)
@@ -1,5 +1,5 @@
1
1
  from .overrider import override_validation_error, patch_422_responses
2
2
 
3
- __version__ = "1.2.2"
3
+ __version__ = "1.2.4"
4
4
 
5
5
  __all__ = ["override_validation_error", "patch_422_responses"]
@@ -35,18 +35,18 @@ dependencies = [
35
35
  ]
36
36
 
37
37
  [project.urls]
38
- Homepage = "https://github.com/mat81black/fastapi-validation-override"
39
- Repository = "https://github.com/mat81black/fastapi-validation-override"
40
- Issues = "https://github.com/mat81black/fastapi-validation-override/issues"
41
- Documentation = "https://github.com/mat81black/fastapi-validation-override#readme"
42
- Changelog = "https://github.com/mat81black/fastapi-validation-override/blob/main/release-notes.md"
38
+ Homepage = "https://github.com/matblack81/fastapi-validation-override"
39
+ Repository = "https://github.com/matblack81/fastapi-validation-override"
40
+ Issues = "https://github.com/matblack81/fastapi-validation-override/issues"
41
+ Documentation = "https://github.com/matblack81/fastapi-validation-override#readme"
42
+ Changelog = "https://github.com/matblack81/fastapi-validation-override/blob/main/release-notes.md"
43
43
 
44
44
  [dependency-groups]
45
45
  dev = [
46
+ "httpx>=0.28.1",
46
47
  "httpx2>=0.28.0",
47
48
  "ruff>=0.14.0",
48
49
  "pytest>=9.1.0",
49
- "pytest-asyncio>=1.3.0",
50
50
  "pytest-dotenv>=0.5.2",
51
51
  "mypy>=1.17.0",
52
52
  "coverage[toml]>=7.14.1",
@@ -123,6 +123,7 @@ keep-runtime-typing = true
123
123
 
124
124
  [tool.typos.default.extend-identifiers]
125
125
  alls = "alls"
126
+ certifi = "certifi"
126
127
 
127
128
  [tool.pytest.ini_options]
128
129
  minversion = "9.0"
@@ -131,8 +132,14 @@ addopts = [
131
132
  "--strict-markers",
132
133
  ]
133
134
  strict_xfail = true
134
- filterwarnings = ["error"]
135
+ filterwarnings = [
136
+ "error",
137
+ # starlette.testclient reads anyio.abc.BlockingPortal at import time; anyio >=4.15
138
+ # deprecated that alias in favor of anyio.from_thread.BlockingPortal. This is
139
+ # starlette's alias to fix (https://github.com/Kludex/starlette/pull/3498), not ours,
140
+ # and anyio isn't a dependency we declare or control the version of. Remove this once
141
+ # the installed starlette no longer triggers the warning.
142
+ "default:The anyio.abc.BlockingPortal alias is deprecated:DeprecationWarning",
143
+ ]
135
144
  testpaths = ["tests"]
136
- asyncio_mode = "auto"
137
- asyncio_default_fixture_loop_scope = "session"
138
145
  pythonpath = ["."]
@@ -0,0 +1,189 @@
1
+ # Release Notes
2
+
3
+ ## Latest Changes
4
+
5
+ ## 1.2.4 (2026-10-26)
6
+
7
+ ### Docs
8
+
9
+ * 🔧 Replace old GitHub username in release notes links. PR [#92](https://github.com/matblack81/fastapi-validation-override/pull/92) by [@matblack81](https://github.com/matblack81).
10
+
11
+ ### Internal
12
+
13
+ * 🔧 Allow the certifi package name in typos. PR [#97](https://github.com/matblack81/fastapi-validation-override/pull/97) by [@matblack81](https://github.com/matblack81).
14
+ * 👷 Run the FastAPI master workflow daily. PR [#96](https://github.com/matblack81/fastapi-validation-override/pull/96) by [@matblack81](https://github.com/matblack81).
15
+ * 👷 Add a weekly CI run against FastAPI master. PR [#95](https://github.com/matblack81/fastapi-validation-override/pull/95) by [@matblack81](https://github.com/matblack81).
16
+ * 👷 Test against the actual latest FastAPI in CI. PR [#94](https://github.com/matblack81/fastapi-validation-override/pull/94) by [@matblack81](https://github.com/matblack81).
17
+ * ✅ Migrate the test suite to TestClient. PR [#93](https://github.com/matblack81/fastapi-validation-override/pull/93) by [@matblack81](https://github.com/matblack81).
18
+
19
+ ## 1.2.3 (2026-10-16)
20
+
21
+ ### Internal
22
+
23
+ * 🔧 Update GitHub owner name. PR [#90](https://github.com/matblack81/fastapi-validation-override/pull/90) by [@matblack81](https://github.com/matblack81).
24
+ * ⬆ Bump the python-packages group with 3 updates. PR [#89](https://github.com/matblack81/fastapi-validation-override/pull/89) by [@dependabot[bot]](https://github.com/apps/dependabot).
25
+ * ⬆ Bump the python-packages group with 3 updates. PR [#88](https://github.com/matblack81/fastapi-validation-override/pull/88) by [@dependabot[bot]](https://github.com/apps/dependabot).
26
+ * ⬆ Bump the github-actions group with 2 updates. PR [#87](https://github.com/matblack81/fastapi-validation-override/pull/87) by [@dependabot[bot]](https://github.com/apps/dependabot).
27
+
28
+ ## 1.2.2 (2026-09-22)
29
+
30
+ ### Internal
31
+
32
+ * ⬆ Bump anyio from 4.14.1 to 4.14.2. PR [#85](https://github.com/matblack81/fastapi-validation-override/pull/85) by [@dependabot[bot]](https://github.com/apps/dependabot).
33
+ * ⬆ Bump the github-actions group with 3 updates. PR [#84](https://github.com/matblack81/fastapi-validation-override/pull/84) by [@dependabot[bot]](https://github.com/apps/dependabot).
34
+ * ⬆ Bump the python-packages group with 8 updates. PR [#83](https://github.com/matblack81/fastapi-validation-override/pull/83) by [@dependabot[bot]](https://github.com/apps/dependabot).
35
+ * ⬆ Bump pre-commit hooks. PR [#82](https://github.com/matblack81/fastapi-validation-override/pull/82) by [@matblack81](https://github.com/matblack81).
36
+ * ⬆ Bump the python-packages group with 4 updates. PR [#81](https://github.com/matblack81/fastapi-validation-override/pull/81) by [@dependabot[bot]](https://github.com/apps/dependabot).
37
+ * ⬆ Bump re-actors/alls-green from 1.2.2 to 1.3.0 in the github-actions group. PR [#80](https://github.com/matblack81/fastapi-validation-override/pull/80) by [@dependabot[bot]](https://github.com/apps/dependabot).
38
+ * ⬆ Bump fastapi from 0.140.0 to 0.141.1. PR [#79](https://github.com/matblack81/fastapi-validation-override/pull/79) by [@dependabot[bot]](https://github.com/apps/dependabot).
39
+ * ⬆ Bump the python-packages group with 9 updates. PR [#78](https://github.com/matblack81/fastapi-validation-override/pull/78) by [@dependabot[bot]](https://github.com/apps/dependabot).
40
+ * ⬆ Bump the github-actions group with 2 updates. PR [#77](https://github.com/matblack81/fastapi-validation-override/pull/77) by [@dependabot[bot]](https://github.com/apps/dependabot).
41
+ * 👷 Replace actions/labeler with Latest Changes App auto-labeling. PR [#76](https://github.com/matblack81/fastapi-validation-override/pull/76) by [@matblack81](https://github.com/matblack81).
42
+
43
+ ## 1.2.1 (2026-08-12)
44
+
45
+ ### Internal
46
+
47
+ * 👷 Tag CI action pins for sync tracking. PR [#74](https://github.com/matblack81/fastapi-validation-override/pull/74) by [@matblack81](https://github.com/matblack81).
48
+
49
+ ## 1.2.0 (2026-08-11)
50
+
51
+ ### Internal
52
+
53
+ * ♻️ Remove unused labeled/unlabeled events and label-checker job from workflows. PR [#72](https://github.com/matblack81/fastapi-validation-override/pull/72) by [@matblack81](https://github.com/matblack81).
54
+ * ⬆️ Migrate the test suite from httpx to httpx2. PR [#71](https://github.com/matblack81/fastapi-validation-override/pull/71) by [@matblack81](https://github.com/matblack81).
55
+ * ♻️ Refactor workflows to use `gh auth setup-git` for improved authentication. PR [#70](https://github.com/matblack81/fastapi-validation-override/pull/70) by [@matblack81](https://github.com/matblack81).
56
+ * ♻️ Simplify patch_422_responses to match what get_openapi() actually produces. PR [#69](https://github.com/matblack81/fastapi-validation-override/pull/69) by [@matblack81](https://github.com/matblack81).
57
+ * ♻️ Refactor GitHub Actions to improve token usage and credential persistence. PR [#68](https://github.com/matblack81/fastapi-validation-override/pull/68) by [@matblack81](https://github.com/matblack81).
58
+
59
+ ## 1.1.1 (2026-08-08)
60
+
61
+ ### Fixes
62
+
63
+ * 🐛 Fix orphaned validation schema components left in the OpenAPI output. PR [#66](https://github.com/matblack81/fastapi-validation-override/pull/66) by [@matblack81](https://github.com/matblack81).
64
+
65
+ ### Docs
66
+
67
+ * 📝 Clarify that patch_422_responses targets get_openapi() output. PR [#58](https://github.com/matblack81/fastapi-validation-override/pull/58) by [@matblack81](https://github.com/matblack81).
68
+
69
+ ### Internal
70
+
71
+ * 🐛 Fix release date defaulting to the date the script was imported. PR [#65](https://github.com/matblack81/fastapi-validation-override/pull/65) by [@matblack81](https://github.com/matblack81).
72
+ * 🐛 Type-check examples in pre-commit, matching the documented lint scope. PR [#64](https://github.com/matblack81/fastapi-validation-override/pull/64) by [@matblack81](https://github.com/matblack81).
73
+ * 📝 Clarify docstrings for the 422 no-op and validation ref naming. PR [#63](https://github.com/matblack81/fastapi-validation-override/pull/63) by [@matblack81](https://github.com/matblack81).
74
+ * ✅ Add test to ensure overriding validation error ignores subsequent calls with different args. PR [#62](https://github.com/matblack81/fastapi-validation-override/pull/62) by [@matblack81](https://github.com/matblack81).
75
+ * ✅ Add regression test for hidden query parameters with undocumented 422 behavior. PR [#61](https://github.com/matblack81/fastapi-validation-override/pull/61) by [@matblack81](https://github.com/matblack81).
76
+ * 🎨 Standardize how examples are run and documented. PR [#60](https://github.com/matblack81/fastapi-validation-override/pull/60) by [@matblack81](https://github.com/matblack81).
77
+ * 🐛 Fix partial release state when release notes write fails. PR [#59](https://github.com/matblack81/fastapi-validation-override/pull/59) by [@matblack81](https://github.com/matblack81).
78
+ * 🐛 Fix infinite recursion on self-referential callback components. PR [#57](https://github.com/matblack81/fastapi-validation-override/pull/57) by [@matblack81](https://github.com/matblack81).
79
+ * 🐛 Reject invalid bump types and cover prepare_release's untested error paths. PR [#56](https://github.com/matblack81/fastapi-validation-override/pull/56) by [@matblack81](https://github.com/matblack81).
80
+ * 🐛 Fix partial release state when release notes update fails. PR [#55](https://github.com/matblack81/fastapi-validation-override/pull/55) by [@matblack81](https://github.com/matblack81).
81
+ * ⬆️ Bump tiangolo/latest-changes to 0.7.1. PR [#54](https://github.com/matblack81/fastapi-validation-override/pull/54) by [@matblack81](https://github.com/matblack81).
82
+ * ✅ Prove PR test changes actually catch a regression before merging. PR [#53](https://github.com/matblack81/fastapi-validation-override/pull/53) by [@matblack81](https://github.com/matblack81).
83
+ * ⬆ Bump fastapi from 0.139.2 to 0.140.0. PR [#52](https://github.com/matblack81/fastapi-validation-override/pull/52) by [@dependabot[bot]](https://github.com/apps/dependabot).
84
+ * ⬆ Bump the python-packages group with 5 updates. PR [#51](https://github.com/matblack81/fastapi-validation-override/pull/51) by [@dependabot[bot]](https://github.com/apps/dependabot).
85
+ * ⬆ Bump the github-actions group with 2 updates. PR [#50](https://github.com/matblack81/fastapi-validation-override/pull/50) by [@dependabot[bot]](https://github.com/apps/dependabot).
86
+
87
+ ## 1.1.0 (2026-08-01)
88
+
89
+ ### Features
90
+
91
+ * ✨ Support custom validation error schemas with any field structure. PR [#44](https://github.com/matblack81/fastapi-validation-override/pull/44) by [@matblack81](https://github.com/matblack81).
92
+ * ✨ Extend validation error patching to webhooks and callbacks. PR [#35](https://github.com/matblack81/fastapi-validation-override/pull/35) by [@matblack81](https://github.com/matblack81).
93
+
94
+ ### Fixes
95
+
96
+ * 🐛 Fix cyclic and unresolvable `$ref` handling in local response resolution. PR [#45](https://github.com/matblack81/fastapi-validation-override/pull/45) by [@matblack81](https://github.com/matblack81).
97
+ * 🐛 Fix invalid OpenAPI produced when merging into a $ref target response. PR [#40](https://github.com/matblack81/fastapi-validation-override/pull/40) by [@matblack81](https://github.com/matblack81).
98
+ * 🐛 Fix user-defined schemas being silently overwritten by validation error definitions. PR [#39](https://github.com/matblack81/fastapi-validation-override/pull/39) by [@matblack81](https://github.com/matblack81).
99
+ * 🐛 Base validation detection on FastAPI's 422 signal instead of schema shape alone. PR [#38](https://github.com/matblack81/fastapi-validation-override/pull/38) by [@matblack81](https://github.com/matblack81).
100
+ * 🐛 Fix custom 422 models with a name ending in HTTPValidationError being silently deleted. PR [#37](https://github.com/matblack81/fastapi-validation-override/pull/37) by [@matblack81](https://github.com/matblack81).
101
+ * 🐛 Fix shared mutable schema objects leaking mutations across routes and apps. PR [#36](https://github.com/matblack81/fastapi-validation-override/pull/36) by [@matblack81](https://github.com/matblack81).
102
+
103
+ ### Refactors
104
+
105
+ * ♻️ Refactor local $ref resolution to support reusable components across multiple sections. PR [#46](https://github.com/matblack81/fastapi-validation-override/pull/46) by [@matblack81](https://github.com/matblack81).
106
+ * ♻️ Read FastAPI's validation error definitions dynamically instead of at import time. PR [#41](https://github.com/matblack81/fastapi-validation-override/pull/41) by [@matblack81](https://github.com/matblack81).
107
+
108
+ ### Docs
109
+
110
+ * 📝 Clarify behavior for `ValidationError`/`HTTPValidationError` schema collisions in README. PR [#48](https://github.com/matblack81/fastapi-validation-override/pull/48) by [@matblack81](https://github.com/matblack81).
111
+ * 📝 Clarify idempotency behavior in README. PR [#43](https://github.com/matblack81/fastapi-validation-override/pull/43) by [@matblack81](https://github.com/matblack81).
112
+
113
+ ### Internal
114
+
115
+ * ✅ Cover webhooks and callbacks with a runnable example. PR [#47](https://github.com/matblack81/fastapi-validation-override/pull/47) by [@matblack81](https://github.com/matblack81).
116
+
117
+ ## 1.0.0 (2026-07-28)
118
+
119
+ 🎉 First stable release of fastapi-validation-override.
120
+
121
+ ## 0.2.0 (2026-07-27)
122
+
123
+ ### Features
124
+
125
+ * ✨ Keep validation errors documented at the target code even with a custom 422 response. PR [#31](https://github.com/matblack81/fastapi-validation-override/pull/31) by [@matblack81](https://github.com/matblack81).
126
+ * ✨ Add public patch_422_responses for schema patching outside override_validation_error. PR [#30](https://github.com/matblack81/fastapi-validation-override/pull/30) by [@matblack81](https://github.com/matblack81).
127
+
128
+ ### Refactors
129
+
130
+ * ♻️ Reorder anyOf to list the validation error before the custom response. PR [#32](https://github.com/matblack81/fastapi-validation-override/pull/32) by [@matblack81](https://github.com/matblack81).
131
+
132
+ ### Internal
133
+
134
+ * ⬆ Bump pre-commit hooks. PR [#29](https://github.com/matblack81/fastapi-validation-override/pull/29) by [@matblack81](https://github.com/matblack81).
135
+ * ⬆ Bump the github-actions group with 3 updates. PR [#28](https://github.com/matblack81/fastapi-validation-override/pull/28) by [@dependabot[bot]](https://github.com/apps/dependabot).
136
+ * ⬆ Bump fastapi from 0.139.0 to 0.139.2. PR [#27](https://github.com/matblack81/fastapi-validation-override/pull/27) by [@dependabot[bot]](https://github.com/apps/dependabot).
137
+ * ⬆ Bump the python-packages group with 5 updates. PR [#26](https://github.com/matblack81/fastapi-validation-override/pull/26) by [@dependabot[bot]](https://github.com/apps/dependabot).
138
+ * 👷 Replace Dependabot pre-commit ecosystem with custom bump workflow. PR [#25](https://github.com/matblack81/fastapi-validation-override/pull/25) by [@matblack81](https://github.com/matblack81).
139
+ * ⬆ Bump the python-packages group across 1 directory with 6 updates. PR [#24](https://github.com/matblack81/fastapi-validation-override/pull/24) by [@dependabot[bot]](https://github.com/apps/dependabot).
140
+ * ⬆ Bump the github-actions group across 1 directory with 4 updates. PR [#23](https://github.com/matblack81/fastapi-validation-override/pull/23) by [@dependabot[bot]](https://github.com/apps/dependabot).
141
+
142
+ ## 0.1.3 (2026-07-10)
143
+
144
+ ### Refactors
145
+
146
+ * ♻️ Clarify idempotency guard comment to reflect actual behavior. PR [#17](https://github.com/matblack81/fastapi-validation-override/pull/17) by [@matblack81](https://github.com/matblack81).
147
+
148
+ ### Docs
149
+
150
+ * 📝 Fix wrong package name in installation commands. PR [#19](https://github.com/matblack81/fastapi-validation-override/pull/19) by [@matblack81](https://github.com/matblack81).
151
+
152
+ ### Internal
153
+
154
+ * ✅ Add tests for query param validation and multi-method path patching. PR [#18](https://github.com/matblack81/fastapi-validation-override/pull/18) by [@matblack81](https://github.com/matblack81).
155
+
156
+ ## 0.1.2 (2026-07-09)
157
+
158
+ ### Internal
159
+
160
+ * 🔧 Integrate Codecov for coverage tracking and update README. PR [#15](https://github.com/matblack81/fastapi-validation-override/pull/15) by [@matblack81](https://github.com/matblack81).
161
+
162
+ ## 0.1.1 (2026-07-09)
163
+
164
+ ### Docs
165
+
166
+ * 📝 Rewrite README with PyPI-safe links and corrected project metadata. PR [#13](https://github.com/matblack81/fastapi-validation-override/pull/13) by [@matblack81](https://github.com/matblack81).
167
+
168
+ ### Internal
169
+
170
+ * ⬆ bump the python-packages group with 5 updates. PR [#11](https://github.com/matblack81/fastapi-validation-override/pull/11) by [@dependabot[bot]](https://github.com/apps/dependabot).
171
+ * ⬆ bump https://github.com/crate-ci/typos from v1.48.0 to 5.0.7 in the pre-commit group. PR [#9](https://github.com/matblack81/fastapi-validation-override/pull/9) by [@dependabot[bot]](https://github.com/apps/dependabot).
172
+ * ⬆ bump dorny/paths-filter from 4.0.1 to 4.0.2 in the github-actions group. PR [#10](https://github.com/matblack81/fastapi-validation-override/pull/10) by [@dependabot[bot]](https://github.com/apps/dependabot).
173
+ * ⬆ bump fastapi from 0.138.0 to 0.139.0. PR [#12](https://github.com/matblack81/fastapi-validation-override/pull/12) by [@dependabot[bot]](https://github.com/apps/dependabot).
174
+ * 🔧 Overhaul CI/CD workflows for labeling, releases, and coverage tracking. PR [#8](https://github.com/matblack81/fastapi-validation-override/pull/8) by [@matblack81](https://github.com/matblack81).
175
+
176
+ ## 0.1.0 (2026-06-25)
177
+
178
+ 🚀 First official public release of **fastapi-validation-override**.
179
+
180
+ Override FastAPI's default 422 validation error with any HTTP status code — patching both the runtime exception handler and the OpenAPI schema in a single call.
181
+
182
+ ### Features
183
+
184
+ * ✨ Override the default 422 validation error with any HTTP status code at runtime and in the OpenAPI schema with a single call.
185
+ * ✨ Automatic OpenAPI schema patch: the 422 entry is replaced by the target status code across all routes that produce a `HTTPValidationError`.
186
+ * ✨ Smart schema merge: if a route already declares a response at the target status code, the validation error schema is merged using `anyOf`.
187
+ * ✨ Custom `app.openapi` preserved: any custom OpenAPI function set by the developer is called first; the patch is applied on top of its output.
188
+ * ✨ Custom exception handler: `handle_exceptions=False` patches only the schema, leaving full control of exception handling to the developer.
189
+ * ✨ Idempotent: safe to call multiple times on the same app instance.