Skip to content

Update dependency django-ninja to v1.6.2#1540

Closed
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/django-ninja
Closed

Update dependency django-ninja to v1.6.2#1540
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/django-ninja

Conversation

@renovate

@renovate renovate Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
django-ninja (source) ==1.4.5==1.6.2 age confidence

Release Notes

vitalik/django-ninja (django-ninja)

v1.6.2: 1.6.2

Compare Source

What's Changed

New Contributors

Full Changelog: vitalik/django-ninja@v1.6.1...v1.6.2

v1.6.1: 1.6.1

Compare Source

What's Changed

Full Changelog: vitalik/django-ninja@v1.6.0...v1.6.1

v1.6.0: 1.6.0

Compare Source

What's New

Idempotent Router(s)

Routers are now reusable and can be mounted to multiple APIs or multiple times within the same API. Decorators, auth, tags, and throttle settings are fully isolated between mounts.

router = Router(tags=["shared"])

@​router.get("/items")
def list_items(request):
    return [{"id": 1}]

# Mount same router to multiple APIs
api_v1 = NinjaAPI(urls_namespace="v1")
api_v1.add_router("/", router)

api_v2 = NinjaAPI(urls_namespace="v2")
api_v2.add_router("/", router) # !!! Before this was giving an error
Cursor Pagination

New CursorPagination class for stable pagination over frequently changing datasets. Uses base64-encoded cursor tokens instead of offsets, ensuring consistent results even when items are added or removed.

from ninja.pagination import paginate, CursorPagination

@​api.get("/events", response=list[EventSchema])
@​paginate(CursorPagination, ordering=("-created",), page_size=20)
def list_events(request):
    return Event.objects.all()
Status Return

New Status class for explicitly returning HTTP status codes. Replaces the old tuple syntax (status_code, body) which is now deprecated.

from ninja import Status

@​api.post("/login", response={200: Token, 401: Message})
def login(request, payload: Auth):
    if not valid:
        return Status(401, {"message": "Unauthorized"})
    return Status(200, {"token": token})
Skip Re-validation

When returning a Pydantic model instance that already matches the response schema, Django Ninja now skips redundant validation and directly serializes — a nice performance boost.

@​api.get("/user", response=UserOut)
def get_user(request):
    return UserOut(id=1, name="John")  # skips re-validation
Streaming Responses (JSONL & SSE)

First-class streaming support with automatic schema validation for each chunk. Supports both JSONL and Server-Sent Events formats.

from ninja.streaming import JSONL, SSE

@​api.get("/items", response=JSONL[Item])
def stream_items(request):
    for i in range(100):
        yield {"name": f"item-{i}", "price": float(i)}

@​api.get("/events", response=SSE[Item])
async def stream_events(request):
    async for item in get_items():
        yield item

Details

New Contributors

Full Changelog: vitalik/django-ninja@v1.5.3...v1.6.0

v1.5.3: 1.5.3

Compare Source

Fixed swagger css #​1648

v1.5.2

Compare Source

A minor update

What's Changed

New Contributors

Full Changelog: vitalik/django-ninja@v1.5.1...v1.5.2

v1.5.1: 1.5.1

Compare Source

What's Changed

Misc

New Contributors

Full Changelog: vitalik/django-ninja@v1.5.0...v1.5.1

v1.5.0: 1.5.0

Compare Source

What's New

Changes

Misc

New Contributors

Chances since Beta1
Full Changelog: vitalik/django-ninja@v1.5.0b1...v1.5.0b2


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • Between 12:00 AM and 03:59 AM, on day 1 of the month (* 0-3 1 * *)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@brianhelba

Copy link
Copy Markdown
Member

Needs to be handled manually, see #1492 .

@brianhelba brianhelba closed this Jul 1, 2026
@brianhelba brianhelba deleted the renovate/django-ninja branch July 1, 2026 03:18
@renovate

renovate Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (==1.6.2). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant