Skip to content

Releases: AghastyGD/lazy-ninja

v0.6.7

21 Sep 09:43
929e732

Choose a tag to compare

🚀 What's New in v0.6.7

✨ Features

  • Improved UUID support in Django model serialization:

    • UUIDField and UUIDAutoField are now correctly mapped to str.

    • Foreign keys referencing UUID primary keys are serialized into strings.

    • Enhanced get_pydantic_type to prioritize UUIDField before AutoField.

🛠️ Fixes

  • Fixed Pydantic validation errors when returning UUID primary keys.

  • Added parse_model_int helper to properly convert string path parameters into the correct type for model PKs in CRUD routes.

  • Ensured compatibility with projects using DEFAULT_AUTO_FIELD = "core.fields.UUIDAutoField".

  • No breaking changes for projects using standard integer AutoField PKs.

🔗 Links

v0.6.6

13 Sep 18:35

Choose a tag to compare

✨ What's Fixed

🐛 Fixed: Added colorama as a dependency.
This ensures that colored output works as expected across different platforms without the need for manual installation.

Full Changelog: v0.6.5...v0.6.6

v0.6.5

31 Aug 22:25
010a421

Choose a tag to compare

🚀 What's New in v0.6.5

Features

  • Enhanced CLI commands:

    • Improved init command with better scaffolding and structure.

    • Extended generate-client to support more flexible client generation directly from OpenAPI schemas.

  • Improved DX: Clearer CLI messages and developer-friendly output.

🧪 Testing

  • Added new test cases for CLI commands.

  • Increased coverage, including edge cases for client generation.

📝 Documentation

  • Added CLI Usage section with practical examples.

  • Updated guide for generating clients and bootstrapping projects.

🔗 Links

v0.6.4

20 Jul 10:50
c504fe1

Choose a tag to compare

🚀 What's New in v0.6.4

✨ Features

  • New CLI command: lazy-ninja generate-client — Generate client SDKs (like TypeScript, Dart, etc.) directly from your Lazy Ninja-based OpenAPI schema, without needing to run the server.

  • Flexible output: Choose your desired generator type and output directory.

🧩 Dependency improvements

  • Optional jdk4py support: You can install Lazy Ninja with the lazy-jdk extra to include a JDK in environments without Java installed.

    pip install lazy-ninja[lazy-jdk]

    If you already have Java installed, no extra installation is needed.

🛠 Issue resolved

  • Resolves #20: Auto generate client(js/dart) CRUD

🔗 Links

Full Changelog: v0.6.3...v0.6.4
PR: #35 - Add CLI command to generate client code from OpenAPI schema

v0.6.3

05 Jul 20:38
5014ba9

Choose a tag to compare

What's Changed

Full Changelog: v0.6.2...v0.6.3

v0.6.2

24 May 16:25
074f717

Choose a tag to compare

What's New

  • File Upload Support:
    Added robust support for file uploads using multipart/form-data. Lazy Ninja now automatically detects FileField and ImageField in Django models and generates routes for these fields using multipart/form-data. Models without file fields continue to use application/json by default.

  • Fine-Grained Upload Control:
    Introduced new parameters for upload configuration:

    • file_fields: Specify which fields in a model should use multipart/form-data.
    • use_multipart: Explicitly define whether create and update operations for specific models should use multipart/form-data.
    • auto_detect_files: Automatically detect FileField and ImageField in your models (default: True).
    • auto_multipart: Automatically enable multipart/form-data for models with detected file fields (default: True).
  • Custom Middleware for PUT/PATCH:
    Added ProcessPutPatchMiddleware to handle PUT and PATCH requests as POST for proper form data processing. This middleware ensures compatibility with both synchronous and asynchronous request handlers, addressing Django's limitations with multipart updates.

v0.6.1

14 Apr 08:37

Choose a tag to compare

✨ What's Fixed

  • 🐛 Fixed: Missing inflect dependency in pyproject.toml caused ModuleNotFoundError on import when using lazy_ninja.builder.
    Users can now install the package without needing to manually add inflect.

v0.6.0

29 Mar 01:21

Choose a tag to compare

What's Changed 🚀

  • Add Documentation Website with MkDocs and by @AghastyGD in #25
  • API Enhancements:
    • Pluralized Routes: Automatically pluralize route names for better readability.
    • init() Method: Added an init() method to simplify API initialization.
    • Exclusion Support: Improved the ability to exclude specific apps or models from route generation.

Full Changelog: v0.5.1...v0.6.0

v0.5.1

27 Mar 22:23
bf25b62

Choose a tag to compare

What's Changed 🚀

  • fix: run model registration in a separate thread in async context by @AghastyGD in #24

Full Changelog: v0.5.0...v0.5.1

v0.5.0

23 Mar 00:17

Choose a tag to compare

🚀 What's New in v0.5.0

Key Features

  • Async Support:

    • Introduced asynchronous route handling with the is_async parameter, allowing users to configure routes as synchronous or asynchronous (default is async).
    • Ensured compatibility with both sync and async operations for seamless integration.
  • Global Error Handling:

    • Added ErrorHandlingMiddleware to provide consistent JSON responses for exceptions.
    • Supports both synchronous and asynchronous request handling, with detailed logging for unexpected errors.
  • Enhanced Filtering:

    • Improved query parameter parsing to handle advanced filtering scenarios.
    • Added dynamic field validation for safer and more robust filtering.

Contributions

  • Add Async Support, Global Error Handling, and Enhanced Filtering by @AghastyGD in #21

Full Changelog: v0.3.1...v0.5.0