Discussions
Why V0.5.0 ListView in API test have Request body, then servers response is 405 Undocumented Error: Method Not Allowed.
I'm practicing using django-ninja-crud in my project, my environment is:
Django-5.0.7 / Django-ninja 1.2.2 / Django-ninja-crud 0.5.0
When i practice according to the example in documents, only the ListView in API testing looks unusual, there have Request body, when i delete the null value, then take execute, the requset is failed, servers reponse show 405 Undocumented Error: Method Not Allowed. How to fix that?
Many thanks for you help and look forward your reply.
Thank you for reporting this issue and for your interest in django-ninja-crud
! I'm glad to inform you that this problem has been resolved in the latest version (v0.6.0
) which was released today.
The issue you encountered with ListView in v0.5.0
was indeed a bug that affected the OpenAPI schema generation, causing unexpected behavior in API testing. (cf. https://github.com/hbakri/django-ninja-crud/issues/415)
In v0.6.0
, significant improvements and refactoring have been made, including a complete overhaul of how request components are handled. This not only fixes the issue you encountered but also greatly enhances the flexibility and robustness of the package. See the full changelog for details.
To resolve this issue and benefit from other improvements, please upgrade:
pip install --upgrade django-ninja-crud
If you experience any issues after upgrading or have any questions about the new version, please don't hesitate to open a new issue on GitHub or ask here on readme! π
Thank you for your creative efforts, I have uptaded django-ninja-crud, It greatly improves the development efficiency !π
ο»Ώ