fix(deps): update dependency django-ninja to ~=1.4.0 #180
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
~= 1.3.0
->~=1.4.0
Release Notes
vitalik/django-ninja (django-ninja)
v1.4.0
Compare Source
What's new
File uploads
request.FILES
in non-POST request - basically there is a long story where Django does not set request.FILES for methods like PUT, PATCHUsers were just struggling to understand why their API endpoints are not validating and had to add special middleware that fixes that
Now django ninja will automatically notify user in that case and will ask to add that middleware when user uses non-POST methods
Pagination
Validation errors
Requests that fail validation raise
ninja.errors.ValidationError
(not to be confused withpydantic.ValidationError
).ValidationError
s have a default exception handler that returns a 422 (Unprocessable Content) JSON response of the form:Error context
Now you can customise it by overwriting the following method:
pattern= Support
Regex pattern fully compatible with latest pydantic, allows you to add extra validation in arguments:
Custom Django model fields
there is now a standard way to register custom django field to pydantic type:
Throttling
Throttling now supports multi-period intervals, such as
5/30s
,10/5m
, and100/2h
. Previously, the throttling implementation only allowed single-period intervals (e.g.,5/s
,100/d
), which limited the granularity and flexibility of rate limits.Full Changelog
Tests
make fmt
and the pipeline to use the same--preview
option of Ruff by @c4ffein in https://github.com/vitalik/django-ninja/pull/1274Docs
New Contributors
Full Changelog: vitalik/django-ninja@v1.3.0...v1.4.0b1
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.