Releases: vitalik/django-ninja
1.1.0
What's Changed
- Pagination set max limit by @HyoungSooo in #915
- Fixed Fields not generated when Meta.fields_optional = 'all' by @vitalik in #986
- Add UUID to supported fields by @gokaykucuk in #982
- Remove Redoc body margin by @Nekidev in #887
- Replace deprecated Pydantic method by @scott-8 in #922
- More comprehensive documentation for CSRF protection by @c4ffein in #906
- Git ignore coverage.xml file by @adamchainz in #944
- Fix pytest.mark.asyncio warning by @adamchainz in #943
- Use ruff to format code instead of black by @jairhenrique in #949
- Attribute
description
declared has typestr
but is used as type None by @luca-digrazia in #530 - Fix test warning by @jairhenrique in #951
- Drop support to unsupported python and django versions by @jairhenrique in #950
- test: Add django 5.0 to the test matrix by @marksweb in #954
- Fix mypy issues by @jairhenrique in #956
- Enable UP rule on ruff by @jairhenrique in #957
- Enable FURB rule on ruff by @jairhenrique in #958
- docs: remove extra backtick in api docs page by @noahgorstein in #964
- Enable PTH rule on ruff by @jairhenrique in #966
- Update ninja conf docs by @jamesrkiger in #972
New Contributors
- @c4ffein made their first contribution in #906
- @adamchainz made their first contribution in #944
- @luca-digrazia made their first contribution in #530
- @Nekidev made their first contribution in #887
- @marksweb made their first contribution in #954
- @noahgorstein made their first contribution in #964
- @HyoungSooo made their first contribution in #915
- @jamesrkiger made their first contribution in #972
- @gokaykucuk made their first contribution in #982
Full Changelog: v1.0.1...v1.1.0
1.0.1
1.0
Read more details and examples here https://django-ninja.dev/whatsnew_v1/
or watch overview video :
Overview
- async authentication fully supported on all layers
- New parameters markers syntax (+
Annotated[]
syntax support) - CSRF is now automatic on Cookie based authentication ( now you should be able to combine multiple cookie/header/etc authenticators and play around with csrf logic)
- Pydantic2 - which has a core re-written in Rust and includes a lot of improvements and features like:
- Safer types.
- Better extensibility.
- Better performance - so far on few projects that I tested getting average 10% speed improvements (some particular views which do lot of validations should get pretty good bumps)
- schema validators/resolvers now have extra context (like request)
- Pagination class accepts a request object
- allow adding routers by string path instead of explicit import
Unfortunately Django ninja integrates very deep into pydantic core with Schema class, so it is not possible to keep both pydantic v1 and v2 supported - and that is why ninja now bumps to version 1 which might have few deprecations or breaking changes on pydantic level
From Django ninja side I tried to make this upgrade as smooth as possible, if you use standard APIs without lot of magic - most likely upgrade should be without any code change
Contributors
@AlTosterino
@AmiZya
@Kristinus
@ddahan
@dipbazz
@ivoire
@lilleswing
@marius-mather
@pavel-beaufort
@pawelngei
@scott-8
@skokado
@vincentdavis
@vpoulailleau
@yasoob
Thank you !
Full Changelog: v0.22.2...v1.0
1.0 RC
What's Changed
- Fixed not awaitable response in async authentication (#44)
This looks like the final pre-release - and I'm happy to report that beta versions was successfully tested by multiple companies in production environments
What's new in 1.x
- async authentication fully supported on all layers
- New parameters markers syntax (+
Annotated[]
syntax support) - CSRF is now automatic on Cookie based authentication ( now you should be able to combine multiple cookie/header/etc authenticators and play around with csrf logic)
- Pydantic2 - which has a core re-written in Rust and includes a lot of improvements and features like:
- Safer types.
- Better extensibility.
- Better performance - so far on few projects that I tested getting average 10% speed improvements (some particular views which do lot of validations should get pretty good bumps)
- schema validators/resolvers now have extra context (like request)
- Pagination class accepts a request object
- allow adding routers by string path instead of explicit import
Unfortunately Django ninja integrates very deep into pydantic core with Schema class, so it is not possible to keep both pydantic v1 and v2 supported - and that is why ninja now bumps to version 1 which might have few deprecations or breaking changes on pydantic level
From Django ninja side I'm trying to make this upgrade as smooth as possible, if you use standard APIs without lot of magic - most likely upgrade should be without any code change
Documentation
- Fix spelling error in motivation documentation by @lilleswing in #874
- Add partial updates and strict validation to the CRUD tutorial by @ddahan in #877
- docs: configure syntax coloring by @ivoire in #878
- docs: use lowercase for language identifier by @ivoire in #879
New Contributors
- @lilleswing made their first contribution in #874
- @ddahan made their first contribution in #877
- @ivoire made their first contribution in #878
Full Changelog: v1.0b2...v1.0rc
1.0 beta2
Warning: This is a pre-release of Django Ninja V1
This is the last change before 1.x release
This version introduces a new cleaner way to mark requests parameters
f.e.
def some_form(request, data: Form[SomeSchema]):
...
instead of
def some_form(request, data: SomeSchema = Form(...)):
...
This syntax looks cleaner/short and has the same code completion hints in popular editors.
On the other hand the old syntax is still supported so you can easy port your project to a newer django-ninja version
Bug changes and improvements
- Forbid extra by @nofalx in #863
- Add a test for list query params by @marius-mather in #852
- (docs) Fix typo in path-params.md by @dipbazz in #854
- (docs) Fix note to be admonitions in query-params.md by @dipbazz in #855
What's new in 1.x
- async authentication fully supported on all layers
- CSRF is now automatic on Cookie based authentication ( now you should be able to combine multiple cookie/header/etc authenticators and play around with csrf logic)
- Pydantic2 - which has a core re-written in Rust and includes a lot of improvements and features like:
- Safer types.
- Better extensibility.
- Better performance - so far on few projects that I tested getting average 10% speed improvements (some particular views which do lot of validations should get pretty good bumps)
- schema validators/resolvers now have extra context (like request)
- Pagination class accepts a request object
- Support for
Annotated[]
syntax - allow adding routers by string path instead of explicit import
Unfortunately Django ninja integrates very deep into pydantic core with Schema class, so it is not possible to keep both pydantic v1 and v2 supported - and that is why ninja now bumps to version 1 which might have few deprecations or breaking changes on pydantic level
From Django ninja side I'm trying to make this upgrade as smooth as possible, if you use standard APIs without lot of magic - most likely upgrade should be without any code change
New Contributors
- @marius-mather made their first contribution in #852
- @dipbazz made their first contribution in #854
- @nofalx made their first contribution in #863
Full Changelog: v1.0b1...v1.0b2
1.0 beta1
Warning: This is a pre-release of Django Ninja V1
On the other hand this is a beta release, so no more dramatic changes expected - mostly bug fixes
There is only one major syntax thing that I'm still considering to add to 1.0 - shorter annotations - #746 - Please take a look and give your vote/thoughts
What's new
- async authentication fully supported on all layers
- CSRF is now automatic on Cookie based authentication ( now you should be able to combine multiple cookie/header/etc authenticators and play around with csrf logic)
- Pydantic2 - which has a core re-written in Rust and includes a lot of improvements and features like:
- Safer types.
- Better extensibility.
- Better performance - so far on few projects that I tested getting average 10% speed improvements (some particular views which do lot of validations should get pretty good bumps)
- schema validators/resolvers now have extra context (like request)
- Pagination class accepts a request object
- Support for
Annotated[]
syntax - allow adding routers by string path instead of explicit import
Unfortunately Django ninja integrates very deep into pydantic core with Schema class, so it is not possible to keep both pydantic v1 and v2 supported - and that is why ninja now bumps to version 1 which might have few deprecations or breaking changes on pydantic level
From Django ninja side I'm trying to make this upgrade as smooth as possible, if you use standard APIs without lot of magic - most likely upgrade should be without any code change
Many thanks to contributors
1.0 alpha3
Warning: This is a pre-release of Django Ninja V1
You probably should not use this version in production
What's new v1a3
- Fixed pydantic context serialisation #825
What's new v1a2
- Pagination class accepts a request object
What's new v1a1
- async authentication fully supported on all layers
- CSRF is now automatic on Cookie based authentication ( now you should be able to combine multiple cookie/header/etc authenticators and play around with csrf logic)
- Pydantic2 - which has a core re-written in Rust and includes a lot of improvements and features like:
- Safer types.
- Better extensibility.
- Better performance - so far on few projects that I tested getting average 10% speed improvements (some particular views which do lot of validations should get pretty good bumps)
Unfortunately Django ninja integrates very deep into pydantic core with Schema class, so it is not possible to keep both pydantic v1 and v2 supported - and that is why ninja now bumps to version 1 which might have few deprecations or breaking changes on pydantic level
From Django ninja side I'm trying to make this upgrade as smooth as possible, if you use standard APIs without lot of magic - most likely upgrade should be without any code change
1.0 alpha2
Warning: This is a pre-release of Django Ninja V1
You probably should not use this version in production
What's new v1a2
- Pagination class accepts a request object
What's new v1a1
- async authentication fully supported on all layers
- CSRF is now automatic on Cookie based authentication ( now you should be able to combine multiple cookie/header/etc authenticators and play around with csrf logic)
- Pydantic2 - which has a core re-written in Rust and includes a lot of improvements and features like:
- Safer types.
- Better extensibility.
- Better performance - so far on few projects that I tested getting average 10% speed improvements (some particular views which do lot of validations should get pretty good bumps)
Unfortunately Django ninja integrates very deep into pydantic core with Schema class, so it is not possible to keep both pydantic v1 and v2 supported - and that is why ninja now bumps to version 1 which might have few deprecations or breaking changes on pydantic level
From Django ninja side I'm trying to make this upgrade as smooth as possible, if you use standard APIs without lot of magic - most likely upgrade should be without any code change
1.0 alpha1
Warning: This is a pre-release of Django Ninja V1
You probably should not use this version in production
What's new
- async authentication fully supported on all layers
- CSRF is now automatic on Cookie based authentication ( now you should be able to combine multiple cookie/header/etc authenticators and play around with csrf logic)
- Pydantic2 - which has a core re-written in Rust and includes a lot of improvements and features like:
- Safer types.
- Better extensibility.
- Better performance - so far on few projects that I tested getting average 10% speed improvements (some particular views which do lot of validations should get pretty good bumps)
Unfortunately Django ninja integrates very deep into pydantic core with Schema class, so it is not possible to keep both pydantic v1 and v2 supported - and that is why ninja now bumps to version 1 which might have few deprecations or breaking changes on pydantic level
From Django ninja side I'm trying to make this upgrade as smooth as possible, if you use standard APIs without lot of magic - most likely upgrade should be without any code change