Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django ninja support #18

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

maticardenas
Copy link
Owner

@maticardenas maticardenas commented Feb 19, 2024

Context

Even though Django Ninja is compatible with Django itself, the way DRF and Django Ninja responses work is slightly different.

For testing (which concerns to this package), DRF endpoints responses are of type rest_framework.response.Response wheres Django Ninja ones are of type django.http.response.HttpResponse

This brings the need of adapting the package in order to properly handle responses for contract validation.
It will also bring other necessary later enhancements specially as we extend the package, but the goal for this PR is just give the minimum support to make it work with Django Ninja APIs as it is.

Changes

  • Support to handle django.http.response.HttpResponse type responses.
  • Add django-ninja as extra dependency.
  • Add django-ninja API as part of the test project and corresponding tests
  • Upgrading minimum supported version to python 3.8

@maticardenas maticardenas self-assigned this Feb 19, 2024
@maticardenas maticardenas linked an issue Feb 19, 2024 that may be closed by this pull request
@maticardenas maticardenas marked this pull request as draft February 19, 2024 13:30
@maticardenas maticardenas force-pushed the 14-add-support-for-django-ninja-test-client branch 15 times, most recently from 70a8e32 to 7ee42ce Compare February 19, 2024 22:22
@maticardenas maticardenas marked this pull request as ready for review February 21, 2024 09:54
@maticardenas maticardenas force-pushed the 14-add-support-for-django-ninja-test-client branch 6 times, most recently from 6c51ecf to 619dd6b Compare February 21, 2024 12:55
@maticardenas maticardenas force-pushed the 14-add-support-for-django-ninja-test-client branch from 619dd6b to 7935e41 Compare February 29, 2024 21:32
@maticardenas maticardenas force-pushed the 14-add-support-for-django-ninja-test-client branch from 7935e41 to 6587d4b Compare February 29, 2024 21:33
@maticardenas maticardenas merged commit 9624522 into master Feb 29, 2024
14 checks passed
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.

Add support for django-ninja test client
1 participant