Skip to content

Release Notes

VersionDateSummary
v1.0.4
diff
2025-11-03notes
Release notes

[1.0.4] - 2025-11-03


✨ Added

  • ModelUtil._rewrite_nested_foreign_keys: reintroduced helper to rename nested FK keys from <field> to <field>_id inside nested dicts (currently invoked conditionally in parse_output_data).

🛠 Changed

  • ModelUtil._extract_field_obj converted to async; now uses agetattr for safer async attribute access.
  • ModelUtil.parse_output_data:
  • Awaits the new async _extract_field_obj.
  • Fetches related instance first, then (conditionally) calls _rewrite_nested_foreign_keys when the outer field is a ForeignKey.

📝 Documentation

  • Table in docs/api/models/model_serializer.md (CreateSerializer attributes) reformatted:
  • Condensed multiline description for customs into a single line with semicolons.
  • Adjusted column widths / alignment for cleaner diff footprint.

⚠ Note / Potential Issue

| Area | Observation | Impact | | ---- | ----------- | ------ | | parse_output_data | Result of _rewrite_nested_foreign_keys is assigned to local v but not reattached to payload (final output still sets payload[k] = rel_instance). | FK key rewriting may be a no-op for consumers; behavior might not match intent. |


🔍 Migration / Action

  1. If you relied on the absence of FK key rewriting (1.0.3), verify whether the restored helper actually affects payloads (it likely does not yet).
  2. If rewriting is desired, ensure the transformed dict (or additional metadata) is surfaced in the serialized output or adjust logic accordingly.

✅ Suggested Follow-Ups

  • Add a test asserting expected presence (or absence) of <field>_id keys in nested output.
  • Decide whether payload should expose both the related object and rewritten key map, or deprecate the helper again if not needed.

v1.0.3
diff
2025-11-03notes
Release notes

[1.0.3] - 2025-11-03


✨ Added

  • M2MRelationSchema: New optional field related_schema documented (auto-generated when using a ModelSerializer).

🛠 Changed

  • Documentation tables (CRUD, Core Attributes, Auth, M2M Endpoints, Hooks) reformatted for alignment & readability.
  • Extra blank lines inserted to improve Markdown rendering clarity.
  • ModelUtil.parse_output_data: simplified nested relation handling (direct instance assignment).

🗑 Removed

  • ModelUtil._rewrite_nested_foreign_keys helper.
  • Foreign key nested dict rewriting logic (<field><field>_id) during output serialization.

📄 Documentation

  • Added warning block describing support for plain Django Model in M2MRelationSchema.model and mandatory related_schema when used.
  • Added related_schema bullet to M2M relation capabilities list.
  • Ensured file ends with a trailing newline.

⚠ Breaking Change

| Change | Impact | | ------ | ------ | | Removal of FK key rewriting in nested outputs | Clients expecting <nested_fk>_id keys must adjust parsing logic |


🔍 Migration Notes

  1. If consumers relied on <nested_fk>_id keys, add a post-serialization adapter to inject them, or reintroduce prior logic.
  2. When declaring M2M relations with plain Django models, always provide related_schema; omission now results in validation errors.

📌 Highlights

  • Cleaner docs + explicit M2M plain model guidance.
  • Leaner serialization path (less mutation, clearer intent).

🧪 Suggested Follow‑Ups

  • Add regression test ensuring nested FK dicts are no longer rewritten.
  • Consider exposing an optional flag to restore legacy FK key rewriting if demand appears.
v1.0.2
diff
2025-11-01notes
Release notes

[1.0.2] - 2025-11-01


✨ Added

  • SonarCloud Quality Gate badge (README + docs index).
  • Custom domain support (docs/CNAME).
  • Release Notes page with dynamic macros (docs/release_notes.md + mkdocs-macros-plugin).
  • Release automation script (main.py) generating tables, full changelog, and cards.
  • ManyToManyAPI helper (ninja_aio/helpers/api.py) with dynamic GET / ADD / REMOVE endpoints, filter schemas, concurrent operations, and query handler support.
  • Helpers package export (helpers/__init__.py).
  • Extended schema support in M2MRelationSchema (auto related_schema via validator).
  • Refactored M2M integration in APIViewSet (now uses ManyToManyAPI).
  • New test suites: decorators, exceptions/API, renderer/parser, many-to-many API.
  • Centralized literal for “not found” (tests/generics/literals.py).

🛠 Changed

  • NotFoundError: error key now uses underscored verbose name.
  • ORJSONRenderer: replaced nested mutation with recursive transform.
  • ModelUtil / ModelSerializer: added comprehensive docstrings, normalized custom field tuples, improved FK and nested output handling.
  • Removed inline M2M view logic from APIViewSet.
  • Enriched model serializer docs (tables, normalization, error cases).
  • M2MRelationSchema: validation for related schema generation.

🧾 Documentation

  • Major rewrite of docs/api/models/model_serializer.md: normalization workflow, error cases, best practices, expanded examples.
  • Added Release Notes navigation in mkdocs.yml.
  • Inline internal-use warning for ManyToManyAPI.
  • Improved readability (spacing, tables, JSON formatting).

✅ Tests

  • Coverage for:
  • ORJSON transformations (bytes→base64, IP→string).
  • unique_view name suffix logic.
  • Exception parsing and API defaults.
  • M2M add/remove flows + duplicate/error handling.
  • Updated NotFoundError key format.
  • Reused shared literal for 404 assertions.

📦 Tooling

  • Added mkdocs-macros-plugin.
  • Automated release visualization (HTML tables, cards).
  • Cleaner MkDocs theme (font configuration).

⚠ Impact

| Change | Potential Effect | | ------ | ---------------- | | Underscored error keys | Clients parsing old keys must adjust | | Extracted M2M logic | Custom subclasses relying on internals must migrate | | 2‑tuple customs now required | Missing values trigger validation errors |


🔍 Upgrade Notes

  1. Update error handling for new 404 key shape.
  2. Migrate any manual M2M endpoint wiring to ManyToManyAPI.
  3. Review custom field tuples—add defaults if optional behavior desired.

🧪 Follow‑Ups

  • Tag release (git tag -a vX.Y.Z -m "Release vX.Y.Z" && git push --tags).
  • Optionally add top-level CHANGELOG.md.
  • Decide on public stability of ManyToManyAPI (remove warning when ready).

📌 Release Template

```markdown

vX.Y.Z (YYYY-MM-DD)

Highlights: - ...

Full release table: /release_notes/

v1.0.1
diff
2025-10-30notes
Release notes

1.0.1 - 2025-10-30

Added

  • Docs: New dev dependencies file requirements.dev.txt.
  • MkDocs: Additional plugins (mkdocstrings, section-index, autorefs) and extended markdown_extensions.
  • Theme extras: social links, analytics stub, version metadata.
  • CSS: Logo sizing rules in docs/extra.css.

Changed

  • README: Reduced length, modernized intro, added concise feature + quick start sections.
  • Pagination docs: Reformatted tables, spacing, clarified examples.
  • Contributing docs: Expanded with setup, PR guidelines, issue template hints.
  • Tutorial (CRUD & Filtering): Table formatting, spacing normalization, improved examples.
  • Favicon path moved docs/img/favicon.icodocs/images/favicon.ico; logo updated.
  • Index docs: Documentation URL switched to custom domain.
  • MkDocs config:
  • site_url updated to https://django-ninja-aio.com/.
  • Added logo/favicon references and rich navigation features.
  • Expanded palette + features (search, code copy/select, tooltips, etc.).
  • PyProject metadata: Documentation URL updated to new domain.
  • Pagination imports switched to from ninja.pagination instead of local alias in examples.
  • Refactor: _m2m_views now takes a single M2MRelationSchema and is invoked in a loop (improves clarity).
  • Minor docstring spacing added before CRUD endpoint decorators.
  • M2M registration: Logic unchanged functionally but simplified iteration pattern.

Removed

  • Legacy automatic loop inside _m2m_views (replaced by external loop in _add_views).
  • Redundant long README sections (old serializer deep examples, extended auth/pagination prose).

Internal

  • _add_views now iterates self.m2m_relations and calls _m2m_views(relation) for each.
  • Consistent path/auth resolution maintained; no schema changes to public API.
  • Added use_directory_urls: true explicitly in mkdocs.yml.

Impact

  • No breaking API changes.
  • Documentation structure improved; search indexing benefits from new plugins.
  • M2M internals slightly cleaner; external behavior stable.

Migration Notes

No action required for existing users.

v1.0.0
diff
2025-10-28notes
Release notes

1.0.0 - 2025-10-28

Added

  • Per‑relation M2M configuration via M2MRelationSchema (replaces tuples).
  • Per‑relation flags: add, remove, get.
  • Per‑relation filters with dynamic schema generation and hook <related_name>_query_params_handler.
  • Method _generate_m2m_filters_schemas to build all M2M filter schemas.
  • Query param injection for M2M GET: filters: Query[filters_schema] = None.
  • Extended docstrings for APIViewSet and internal helper methods.
  • Overridable hooks documented in docs (query_params_handler, per‑relation handlers).
  • Changelog: version bump to __version__ = "1.0.0".

Changed

  • api_view_set.md rewritten: tuple-based M2M section replaced with M2MRelationSchema docs, new sections for filters, hooks, examples.
  • CRUD table wording (schema_out formatting, notes clarified).
  • Auth resolution notes now include M2M fallback logic.
  • Internal view registration: per-relation flags extracted (m2m_add/remove/get replaced by schema attributes).
  • Error message spacing adjusted in _check_m2m_objs.
  • Refactored internal function docs (more concise, purpose-focused).
  • Dynamic filter/path schemas built through unified _generate_schema.

Removed

  • Class attributes: m2m_add, m2m_remove, m2m_get.
  • Tuple-based m2m_relations formats.
  • Legacy verbose examples inside views() docstring.
  • Redundant m2m_auth entry in auth table (moved to core attributes table).

Internal

  • Added per-method docstrings (create_view, list_view, retrieve_view, update_view, delete_view, _m2m_views, _add_views, etc.).
  • _crud_views now described as a mapping.
  • Added storage of self.m2m_filters_schemas during init.
  • GET M2M handler applies optional per-relation filter hook if present.
  • Manage M2M handler chooses input schema dynamically (M2MSchemaIn / M2MAddSchemaIn / M2MRemoveSchemaIn).

Migration Notes

Old: python m2m_relations = [ (Tag, "tags"), (Category, "categories", "article-categories"), (Author, "authors", "co-authors", [AdminAuth()]) ] m2m_add = True m2m_remove = True m2m_get = True

New: ```python from ninja_aio.schemas import M2MRelationSchema

m2m_relations = [ M2MRelationSchema(model=Tag, related_name="tags"), M2MRelationSchema(model=Category, related_name="categories", path="article-categories"), M2MRelationSchema(model=Author, related_name="authors", path="co-authors", auth=[AdminAuth()]) ]

Disable ops per relation if needed:

M2MRelationSchema(model=Tag, related_name="tags", add=False, remove=False, get=True)

```

Per‑relation filters: ```python M2MRelationSchema( model=Tag, related_name="tags", filters={"name": (str, "")} )

async def tags_query_params_handler(self, queryset, filters): if filters.get("name"): queryset = queryset.filter(name__icontains=filters["name"]) return queryset ```

Breaking Changes

  • m2m_relations must use M2MRelationSchema (no tuples).
  • Removed m2m_add, m2m_remove, m2m_get (use per-relation flags).
  • Any code unpacking relation tuples must be updated to attribute access.

Summary

Release focuses on granular M2M configuration, per‑relation filtering, cleaner internals, and clearer documentation for extensibility.

v0.11.4
diff
2025-10-28notes
Release notes

0.11.4 - 2025-10-28

Changed

  • Documentation heading renamed from # API ViewSet to # APIViewSet.
  • Docs rewritten: long examples replaced with concise endpoint table and structured attribute sections.
  • Core attributes table expanded (added pagination_class, query_params, disable, endpoint doc strings).
  • Clarified authentication resolution; explicit mention of m2m_auth.

Added

  • Per-relation M2M configuration: support for 3- and 4-element tuples in m2m_relations.
  • 3 elements: (model, related_name, custom_path)
  • 4 elements: (model, related_name, custom_path, per_relation_auth)
  • Per-relation auth override (local m2m_auth inside _m2m_views loop).
  • Documentation of M2M path/auth resolution rules.

Removed

  • Global m2m_path attribute (replaced by per-relation path tuple element).
  • Old m2m_relations signature list[tuple[ModelSerializer | Model, str]].

Internal Implementation

  • M2M loop updated: for m2m_data in self.m2m_relations: with dynamic tuple length parsing.
  • Path resolution: python rel_path = rel_util.verbose_name_path_resolver() if not m2m_path else m2m_path
  • Auth passed to decorators as auth=m2m_auth instead of auth=self.m2m_auth.
  • Continued use of @unique_view(...) for stable handler naming.

Migration Notes

```python

Before

m2m_relations = [(Tag, "tags")] m2m_path = "custom-tags" # no longer supported

After

m2m_relations = [ (Tag, "tags"), # auto path + fallback auth (Category, "categories", "custom-categories"), # custom path (Author, "authors", "article-authors", [AdminAuth()]) # custom path + custom auth ] `` - Remove anym2m_path` usage. - 2-element tuples remain valid (no breaking change).

Summary

Improved flexibility and granularity for M2M relation configuration and streamlined documentation.

v0.11.3
diff
2025-10-28notes
Release notes

[0.11.3] - 2025-10-28

Added

  • M2M Path Customization: Added m2m_path attribute to APIViewSet for custom many-to-many relationship endpoint paths
  • Default: empty string (uses auto-generated path from model verbose name)
  • Allows overriding the default path resolution for M2M endpoints

Changed

APIViewSet Class Attributes

  • m2m_relations type annotation: Changed from tuple[ModelSerializer | Model, str] to list[tuple[ModelSerializer | Model, str]]
  • More flexible and mutable data structure
  • Allows dynamic modification of M2M relations at runtime

Code Quality & Formatting

  • Consistent blank lines: Added blank lines after function returns for better code readability
  • Applied to: create_view(), list_view(), retrieve_view(), update_view(), delete_view()
  • Removed extra blank line: Cleaned up unnecessary blank line in delete_view() method
  • M2M views refactoring: Improved code structure for many-to-many relationship views
  • Applied @unique_view decorator to M2M endpoints (get_related, manage_related)
  • Removed manual __name__ assignment in favor of decorator pattern
  • Better separation of concerns between GET and POST operations
  • Moved conditional M2M add/remove logic outside of the GET endpoint block

M2M Endpoint Generation

  • Dynamic path resolution: M2M endpoints now respect custom m2m_path attribute ```python rel_path = ( rel_util.verbose_name_path_resolver() if not self.m2m_path else self.m2m_path )
v0.11.1
diff
2025-10-28notes
Release notes

[0.11.1] - 2025-10-28

Fixed

  • Fixed typo in module name: renamed decoratos.py to decorators.py
  • Updated import statement in views.py to use correct decorators module name

Changed

Documentation

  • Homepage Examples - Updated traditional approach comparison
  • Changed from Django REST Framework serializers to Django Ninja ModelSchema
  • Simplified example from UserSerializer to UserSchemaOut
  • Simplified example from UserCreateSerializer to UserSchemaIn
  • Updated view examples to use Django Ninja's @api.get() and @api.post() decorators
  • Replaced class-based views (UserListView, UserCreateView) with function-based views
  • Removed sync_to_async wrapper calls in favor of native async Django ORM operations
  • Simplified user creation with direct acreate() usage
  • Updated response format to use tuple-based status code returns (201, user)
  • Made code examples more concise and modern

Technical Details

Module Renaming

```python

Before (v0.11.0)

from .decoratos import unique_view

After (v0.11.1)

from .decorators import unique_view

v0.11.0
diff
2025-10-26notes
Release notes

[0.11.0] - 2025-10-26

Added

Documentation

  • Complete documentation website with MkDocs Material theme
  • Custom domain configuration (ninja-aio.dev) via CNAME
  • Getting Started Guide
  • Installation instructions
  • Quick start tutorial with screenshots
  • Auto-generated Swagger UI examples
  • Tutorial Series (4 comprehensive steps)
  • Step 1: Define Your Model - Complete guide to ModelSerializer with relationships, custom fields, and lifecycle hooks
  • Step 2: Create CRUD Views - APIViewSet usage, custom endpoints, query parameters, and error handling
  • Step 3: Add Authentication - JWT setup with RSA keys, role-based access control, and ownership validation
  • Step 4: Add Filtering & Pagination - Advanced filtering, full-text search, ordering, and performance optimization
  • API Reference Documentation
  • Authentication guide (965 lines) covering AsyncJwtBearer, JWT validation, RBAC, and integrations
  • ModelSerializer reference (806 lines) with schema generation and relationship handling
  • ModelUtil reference (1,066 lines) detailing CRUD operations and data transformations
  • APIView documentation for custom endpoints
  • APIViewSet documentation (327 lines) for complete CRUD operations
  • Pagination guide (750 lines) with custom pagination examples
  • Contributing guidelines
  • Logo and branding assets
  • Extra CSS styling for code blocks

Core Features

  • NotFoundError Exception
  • New exception class for 404 errors with model-aware error messages
  • Automatically includes model verbose name in error response
  • Status code 404 with structured error format

Utilities

  • Decorators Module (ninja_aio/decoratos.py)
  • aatomic decorator for asynchronous atomic transactions
  • AsyncAtomicContextManager for async transaction context management
  • unique_view decorator for generating unique view names based on model metadata
  • Support for both singular and plural model naming conventions

Examples

  • Example 1 (examples/ex_1/)
  • Basic User model without relationships
  • Simple ViewSet implementation
  • Basic URL configuration
  • Example 2 (examples/ex_2/)
  • User and Customer models with ForeignKey relationship
  • JWT authentication setup with RSA keys
  • Complete auth configuration with mandatory claims
  • Related field serialization examples

Development Tools

  • MkDocs configuration (mkdocs.yml)
  • Material theme with deep purple color scheme
  • Dark/light mode support with auto-detection
  • Navigation tabs and integrated TOC
  • Code highlighting with Pygments
  • Admonitions and superfences support
  • Documentation requirements file
  • Custom CSS for documentation styling

Changed

Core Models

  • ModelSerializer
  • Enhanced docstring (113 lines) with comprehensive API documentation
  • Detailed explanation of schema generation and relationship handling
  • Examples for CreateSerializer, ReadSerializer, and UpdateSerializer
  • Documented sync and async lifecycle hooks
  • ModelUtil
  • Enhanced docstring (79 lines) documenting all CRUD operations
  • Detailed method documentation for parse_input_data, parse_output_data, and CRUD methods
  • Performance notes and error handling documentation
  • Updated to use NotFoundError instead of generic SerializeError for 404 cases

Views

  • APIViewSet
  • Applied @unique_view decorator to all generated CRUD methods (create, list, retrieve, update, delete)
  • Removed manual __name__ assignment in favor of decorator-based approach
  • Cleaner method definitions without post-definition name mutations
  • APIView
  • Added comprehensive docstring explaining base class functionality

Authentication

  • AsyncJwtBearer
  • Enhanced docstring (71 lines) with detailed attribute and method documentation
  • Security considerations and best practices
  • Integration examples with Auth0, Keycloak, and Firebase

Project Structure

  • Reorganized documentation structure with clear separation of concerns

Fixed

  • Consistent error handling using NotFoundError for object not found scenarios
  • Proper async context management for database transactions

Documentation Improvements

Tutorial Content

  • 4,435 total lines of tutorial content
  • 120+ code examples across all tutorials
  • 50+ API usage examples with curl commands
  • Comprehensive error handling examples
  • Performance optimization tips and best practices

API Reference

  • 3,994 total lines of API reference documentation
  • Complete method signatures with parameter descriptions
  • Return type documentation
  • Error handling specifications
  • Integration examples

Visual Assets

  • Swagger UI screenshots for all CRUD operations
  • Logo and branding images
  • Diagram examples (where applicable)

Notes

Breaking Changes

None - This is a documentation and enhancement release

Migration Required

None - All changes are backward compatible

Known Issues

None reported

Links

  • Documentation: https://caspel26.github.io/django-ninja-aio-crud/
v0.10.3
diff
2025-09-23notes
Release notes

[0.10.3] - 2025-09-23

🔧 Changed

  • ModelUtil Refactoring: Extracted model field handling logic into separate property
  • Added model_fields property to encapsulate [field.name for field in self.model._meta.get_fields()]
  • Updated serializable_fields property to use new model_fields property for non-ModelSerializerMeta models

🛠️ Fixed

  • Custom Field Filtering: Enhanced custom field detection logic to prevent conflicts with actual model fields
  • Custom fields are now filtered to exclude fields that exist in the actual Django model
  • Added k not in self.model_fields condition to both custom field dictionary comprehension and iteration logic
  • Prevents custom serializer fields from overriding or conflicting with real model fields

📈 Improvements

  • Code Organization: Better separation of concerns with dedicated model_fields property
  • Field Conflict Prevention: More robust handling of custom vs model field distinction
  • Code Readability: Improved maintainability by reducing code duplication in field name extraction

🔄 Technical Details

  • The customs dictionary now only includes truly custom fields that don't exist on the model
  • Custom field processing in the main loop now respects model field boundaries
  • Better encapsulation of model introspection logic
v0.10.2
diff
2025-09-18notes
Release notes

[0.10.2] - 2025-09-18

✨ Added

  • Pagination Support for M2M Relations: Added @paginate(self.pagination_class) decorator to M2M get_related endpoints for better performance with large datasets

🔧 Changed

  • Code Quality Improvements:
  • Cleaned up response schema formatting in M2M GET endpoints (removed unnecessary line breaks)
  • Fixed spacing inconsistency in self.error_codes assignment
  • Improved variable initialization readability in M2M management function
  • Added proper line spacing for better code organization

  • Dynamic M2M Endpoint Documentation:

  • Enhanced summary and description generation for M2M endpoints based on available operations
  • Summary now dynamically shows "Add", "Remove", or "Add or Remove" based on configuration
  • More intuitive endpoint descriptions that reflect actual capabilities

  • Function Naming Convention:

  • Renamed add_and_remove_related to manage_related for better semantic clarity
  • Updated function name assignment to manage_{model_name}_{relation_path} pattern

  • Schema Selection Logic: Refactored conditional schema assignment using ternary operators for better readability

🛠️ Technical Improvements

  • Variable Declaration: Simplified tuple unpacking for M2M operation variables
  • Code Formatting: Improved consistency in code spacing and line breaks
  • Function Organization: Better separation of logic blocks with appropriate whitespace

📈 Performance

  • M2M related object listing now supports pagination, reducing memory usage and improving response times for large relationship sets
v0.10.1
diff
2025-09-18notes
Release notes

[0.10.1] - 2025-09-18

✨ Added

  • Pagination Support for M2M Relations: Added @paginate(self.pagination_class) decorator to M2M get_related endpoints for better performance with large datasets

🔧 Changed

  • Code Quality Improvements:
  • Cleaned up response schema formatting in M2M GET endpoints (removed unnecessary line breaks)
  • Fixed spacing inconsistency in self.error_codes assignment
  • Improved variable initialization readability in M2M management function
  • Added proper line spacing for better code organization

  • Dynamic M2M Endpoint Documentation:

  • Enhanced summary and description generation for M2M endpoints based on available operations
  • Summary now dynamically shows "Add", "Remove", or "Add or Remove" based on configuration
  • More intuitive endpoint descriptions that reflect actual capabilities

  • Function Naming Convention:

  • Renamed add_and_remove_related to manage_related for better semantic clarity
  • Updated function name assignment to manage_{model_name}_{relation_path} pattern

  • Schema Selection Logic: Refactored conditional schema assignment using ternary operators for better readability

🛠️ Technical Improvements

  • Variable Declaration: Simplified tuple unpacking for M2M operation variables
  • Code Formatting: Improved consistency in code spacing and line breaks
  • Function Organization: Better separation of logic blocks with appropriate whitespace

📈 Performance

  • M2M related object listing now supports pagination, reducing memory usage and improving response times for large relationship sets
v0.10.0
diff
2025-09-15notes
Release notes

[0.10.0] - 2025-09-15

🚀 Added

  • Many-to-Many Relations Support: Complete M2M relationship management system
  • Added M2MDetailSchema, M2MSchemaOut, M2MSchemaIn, M2MAddSchemaIn, M2MRemoveSchemaIn schemas
  • New m2m_relations configuration for defining M2M relationships to manage
  • m2m_add, m2m_remove, m2m_get boolean flags to control M2M operations
  • m2m_auth parameter for M2M-specific authentication
  • Auto-generated M2M endpoints for getting, adding, and removing related objects
  • Enhanced ModelUtil: Added return type annotations for better IDE support
  • Async Support: Added asyncio import for concurrent M2M operations

🔧 Changed

  • BREAKING: Enhanced JWT authentication error handling in AsyncJwtBearer
  • Now returns False instead of raising AuthError for invalid tokens
  • Added proper exception handling for JoseError during claims validation
  • Improved authentication flow with better error recovery
  • ModelUtil.get_object(): Enhanced to return QuerySet when no primary key is provided
  • APIViewSet Documentation: Updated class docstring with M2M configuration options

🛠️ Fixed

  • JWT Error Handling: More graceful handling of JWT decode and validation errors
  • Import Organization: Added missing errors import from joserfc

📚 Technical Details

  • Added _check_m2m_objs() helper method for M2M object validation
  • Added _m2m_views() method for automatic M2M endpoint generation
  • M2M operations use asyncio.gather() for concurrent add/remove operations
  • Dynamic function naming for M2M endpoints to avoid conflicts
  • Comprehensive error reporting for M2M operations with detailed success/failure counts

🔄 Migration Notes

  • Update JWT error handling if you were catching AuthError exceptions
  • Configure m2m_relations if you want to use the new M2M management features
  • Review authentication flows as JWT validation now returns False instead of raising errors
0.9.2
diff
2025-08-25notes
Release notes

[0.9.2] - 2025-08-25

Changed

  • BREAKING: Refactored route registration system in APIViewSet
  • All CRUD views now use @self.router decorators instead of @self.api
  • Simplified path handling by using class properties (self.path, self.get_path, etc.) instead of string concatenation
  • Removed explicit tags parameter from individual view decorators (now handled at router level)
  • Streamlined add_views_to_route() method to directly return router registration

Removed

  • Removed manual tags=[self.router_tag] from all CRUD view decorators (create, list, retrieve, update, delete)

Added

  • Added comprehensive test_crud_routes() test method to validate:
  • Correct route paths are registered
  • Proper handling of excluded views
  • Path names are correctly assigned for all CRUD operations

Technical Details

  • Route paths now use dynamic properties instead of hardcoded string formatting
  • Router registration is now more efficient with inline view addition
  • Improved test coverage for route validation and exclusion scenarios
v0.9.1
diff
2025-08-25notes
Release notes

[0.9.1] - 2025-08-25

Changed

  • Bumped version from 0.9.0 to 0.9.1 by @caspel26

Removed

  • Removed test_crud_routes() method from test suite in tests/generics/views.py by @caspel26

Fixed

  • Fixed missing API assignment in _create_relation() method - added cls.relation_viewset.api = cls.api before view creation by @caspel26

Technical Details

  • Cleaned up test code by removing redundant route testing logic by @caspel26
  • Improved test reliability by ensuring proper API context in relation creation helper method by @caspel26
v0.9.0
diff
2025-07-18notes
Release notes

Changelog

[0.9.0] - 2025-07-18

Changed

  • Removed trailing slashes from base API routes by @caspel26
  • Renamed add_views() to _add_views() (now private implementation method) by @caspel26
  • Added comprehensive docstrings to APIViewSet class by @caspel26
  • Added view-specific documentation properties by @caspel26 :
  • list_docs
  • create_docs
  • retrieve_docs
  • update_docs
  • delete_docs
  • Added automatic endpoint summaries and descriptions based on model metadata by @caspel26
  • Improved path handling with new properties by @caspel26 :
  • get_path
  • get_path_retrieve
  • Added model_verbose_name property for consistent naming by @caspel26
  • Updated test paths to match new URL structure by @caspel26
  • Added trailing slash to api_route_path in test view classes by @caspel26
v0.8.4
diff
2025-06-20notes
Release notes

[0.8.4] - 2025-06-20

Changes to ninja_aio/views.py

Refactoring

  • Updated self.router_tag assignment:
  • Before: self.router_tag = self.model_util.model_name.capitalize()
  • After: self.router_tag = " ".join(self.model._meta.verbose_name.capitalize().split(" "))
  • This change improves the readability of the router tag by using the model's verbose_name, preserving spacing between words. by @caspel26

Minor Fixes

  • Removed unnecessary trailing spaces in *_view_auth() methods (get_view_auth, post_view_auth, patch_view_auth, delete_view_auth). by @caspel26
v0.8.3
diff
2025-06-18notes
Release notes

[0.8.3] - 2025-06-18

Changed

  • Updated version number from 0.8.2 to 0.8.3. by @caspel26

Fixed

  • Improved the _auth_view method in APIViewSet to avoid potential AttributeError by using getattr(..., None) with a default value. by @caspel26
v0.8.2
diff
2025-06-18notes
Release notes

[0.8.2] - 2025-06-18

Added

  • Introduced per-method authentication options to APIViewSet:
  • get_auth
  • post_auth
  • patch_auth
  • delete_auth by @caspel26
  • Added helper methods to resolve per-method auth:
  • get_view_auth()
  • post_view_auth()
  • patch_view_auth()
  • delete_view_auth() by @caspel26

Changed

  • All route decorators (@router.get, @router.post, etc.) now use the new per-method auth resolution instead of the global auth attribute. by @caspel26
  • Minor type ignore hints (# type: ignore) added for compatibility and typing support. by @caspel26

Fixed

  • Ensured route-specific authentication is configurable and overrides the global auth setting properly when defined. by @caspel26
v0.8.1
diff
2025-06-18notes
Release notes

What's Changed

News:

  • Added support for IPAddress serialization by @caspel26

Full Changelog: https://github.com/caspel26/django-ninja-aio-crud/compare/v0.8.0...v0.8.1

v0.8.0
diff
2025-05-15notes
Release notes

What's Changed

News:

  • Added save methods:
  • on_create_before_save;
  • on_create_after_save;
  • before_save;
  • after_save. by @caspel26.

  • Added on_delete method by @caspel26.

  • Updated README.md by @caspel26.

  • Optimized async post object creation operations by @caspel26.
  • Updated code docstrings by @caspel26 .

Full Changelog: https://github.com/caspel26/django-ninja-aio-crud/compare/v0.7.8...v0.8.0

v0.7.8
diff
2025-03-21notes
Release notes

What's Changed

News:

  • Added api_routh_path attribute to APIViewSet by @caspel26.

Full Changelog: https://github.com/caspel26/django-ninja-aio-crud/compare/v0.7.7...v0.7.8

  • You can use this attribute if you do not want to use model verbose name plural as router path.

```python

views.py

from ninja_aio.views import APIViewSet from ninja_aio import NinjaAIO

from api.models import Foo

api = NinjaAIO()

class FooAPI(APIViewSet): model = Foo api = api api_route_path = "testpaths"

FooAPI().add_views_to_route() ```

v0.7.7
diff
2025-03-05notes
Release notes

What's Changed

News:

  • Queryset request method is called while serializing output data by @caspel26

Full Changelog: https://github.com/caspel26/django-ninja-aio-crud/compare/v0.7.6...v0.7.7

v0.7.6
diff
2025-02-24notes
Release notes

What's Changed

News:

  • Schema from orm method called async while serializing by @caspel26

Full Changelog: https://github.com/caspel26/django-ninja-aio-crud/compare/v0.7.5...v0.7.6

v0.7.5
diff
2025-02-22notes
Release notes

What's Changed

News:

  • During serialization model fields are get asynchronously by @caspel26

Full Changelog: https://github.com/caspel26/django-ninja-aio-crud/compare/v0.7.4...v0.7.5

v0.7.4
diff
2025-02-20notes
Release notes

What's Changed

News:

  • Added to ModelSerializer related schema. can obtain it by generate_related_s method by @caspel26
  • General serialization refactor by @caspel26

Bug Fix:

  • Depth of relation serialization by @caspel26.

Full Changelog: https://github.com/caspel26/django-ninja-aio-crud/compare/v0.7.2...v0.7.3

v0.7.3
diff
2025-02-19notes
Release notes

What's Changed

News:

  • Added to ModelSerializer related schema. can obtain it by generate_related_s method by @caspel26
  • General serialization refactor by @caspel26

Bug Fix:

  • Depth of relation serialization by @caspel26.

Full Changelog: https://github.com/caspel26/django-ninja-aio-crud/compare/v0.7.2...v0.7.3

v0.7.2
diff
2025-01-30notes
Release notes

What's Changed

News:

  • Added support for relations serializations even if them are not ModelSerializer type by @caspel26.

Full Changelog: https://github.com/caspel26/django-ninja-aio-crud/compare/v0.7.1...v0.7.2

  • You can serialize them by adding into ReadSerializer as custom fields.

```python

models.py

from django.db import models from ninja_aio.models import ModelSerializer from ninja import Schema

class BarSchema(Schema): id: int name: str description: str

class Foo(ModelSerializer): name = models.CharField(max_length=30) bar = models.ForeignKey(Bar, on_delete=models.CASCADE, related_name="foos") active = models.BooleanField(default=False)

@property def full_name(self): return f"{self.name} example_full_name"

class ReadSerializer: excludes = ["bar"] customs = [("full_name", str, ""), ("bar", BarSchema, ...)]

class CreateSerializer: fields = ["name"] optionals = [("bar", str), ("active", bool)]

class UpdateSerializer: excludes = ["id", "name"] optionals = [("bar", str), ("active", bool)] ```

v0.7.1
diff
2025-01-29notes
Release notes

What's Changed

News:

  • fix optionals Create and Update serializers , they didn't work properly with relations by @caspel26.
  • now if the relation declared has a read serializer it will be used properly into serialization by @caspel26

Full Changelog: https://github.com/caspel26/django-ninja-aio-crud/compare/v0.6.3...v0.7.1

v0.7.0
diff
2025-01-29-
Release notes

No release notes.

v0.6.4
diff
2025-01-22notes
Release notes

What's Changed

News:

  • Added with_qs_request param to ModelUtil get_object function by @caspel26.

Full Changelog: https://github.com/caspel26/django-ninja-aio-crud/compare/v0.6.2...v0.6.3

  • By default get object function use queryset request method defined into model, you can disable it by adding with_qs_request=False

And that's it! For more information check README

v0.6.3
diff
2025-01-22-
Release notes

No release notes.

v0.6.2
diff
2025-01-19-
Release notes

No release notes.

v0.6.1
diff
2025-01-13-
Release notes

No release notes.

v0.6.0
diff
2025-01-12-
Release notes

No release notes.

v0.5.0
diff
2025-01-09-
Release notes

No release notes.

v0.4.0
diff
2025-01-08-
Release notes

No release notes.

v0.3.1
diff
2024-11-07-
Release notes

No release notes.

v0.3.0
diff
2024-10-10-
Release notes

No release notes.

v0.2.2
diff
2024-10-03-
Release notes

No release notes.

v0.2.1
diff
2024-10-02-
Release notes

No release notes.

v0.2.0
diff
2024-10-01-
Release notes

No release notes.

v0.1.4
diff
2024-09-29-
Release notes

No release notes.

v0.1.3
diff
2024-09-28-
Release notes

No release notes.

v0.1.2
diff
2024-09-26-
Release notes

No release notes.

v0.1.1
diff
2024-09-26-
Release notes

No release notes.