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

Integrate RecursiveField with drf-recursive #890

Open
kytta opened this issue Sep 26, 2024 · 1 comment
Open

Integrate RecursiveField with drf-recursive #890

kytta opened this issue Sep 26, 2024 · 1 comment

Comments

@kytta
Copy link

kytta commented Sep 26, 2024

Feature Request

Description

drf-yasg already has integration with djangorestframework-recursive, and it works as expected. However, the project hasn't seen development in quite a while, so it was forked into drf-recursive. Apart from the PyPI project, the Python package also got a new name:

-from rest_framework_recursive.fields import RecursiveField
+from django_rest_framework_recursive.fields import RecursiveField

As such, yasg does not detect the schema correctly and uses string as type for these fields.

Describe the solution you'd like

Also support drf-recursive's django_rest_framework_recursive as import source for the field. You can achieve this using conditional imports.

Describe alternatives you've considered

You could also provide a setting where I can specify what field I want to use for the recursive functionality.

@kytta
Copy link
Author

kytta commented Sep 26, 2024

To be honest, I wish folks at Kraken never renamed the package in the first place. drf-recursive was never intended to be installed along with, but to replace djangorestframework-recursive, so keeping the package name the same would not cause problems.

@NicholasBunn sorry to ping you in this (I'd go to your issue tracker, but your repo has issues disabled), but how realistic is it for me to wish that drf-recursive changes the package name back to rest_framework_recursive? 😅

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

No branches or pull requests

1 participant