-
Notifications
You must be signed in to change notification settings - Fork 440
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
Migrate away from abandoned coreapi/coreschema dependency #389
Comments
Well, to be honest, if the OpenAPI implementation in DRF is up to snuff, the plan would be to deprecate this library altogether 🙂 Time will tell. Otherwise, we'll have to review which parts of coreapi are used here and how we can replace them. |
Another benefit of removing the dependency on |
Migrating issue details from JoelLefkowitz#60. Given that this is a long-term maintenance risk for the project, I am going to pin this issue for more visibility. From the
DRF will soon be raising deprecation warnings for CoreAPI schemas and they will be removed in DRF 3.14. I haven't looked closely enough at The Another benefit of removing the dependency on Seems like we should try to identify and migrate over the parts of
|
We depend on the coreapi for filters (in particular: django-filter) and paginators compat https://github.com/axnsan12/drf-yasg/blob/master/src/drf_yasg/inspectors/query.py I imagine this could be replaced to use some new interface which is now used by DRF for its openapi schema |
In case it helps, I also made a listing of everywhere Here is the comment: JoelLefkowitz#60 (comment) It seems that potentially they could be tackled independently? |
The coreapi.compat ones should be easy since it was just used as a lazy python 2 compatibility shim. urlparse -> from urllib.parse |
It seems that https://github.com/encode/django-rest-framework/blob/04e0c2b9ab6616a28148ce32e2d19858ccfe6c69/rest_framework/pagination.py#L228 |
Those APIs were added in DRF 3.10 so we are already clear from a compatibility pov to use them unconditionally (and drop coreapi/coreschema completely): |
When starting some work on this in #664, I discovered there is another hidden dependency on drf-yasg/src/drf_yasg/generators.py Line 183 in 789a96c
DRF will throw an exception from |
Okay, I've confirmed that the remaining So we have a relatively short timeline to avoid warnings being generated in |
For anyone still tracking this (I've personally ported to |
There are a couple of configs which conflicts with #854 drf-yasg/src/drf_yasg/app_settings.py Lines 22 to 28 in 6557517
As of now these are still pinned to the old coreapi ones, this causes swagger generation to crash due to the fact that by default it tries to invoke some DRF methods which requires coreapi. |
@sevdog Good point. It is high time to switch to receiving parameters not from coreapi. But this is a minor/major change. I can create a class that will take other methods from the paginator and filters, but making it default is better for the maintainer (@JoelLefkowitz ) |
just an fyi, there is now another deprecation warning related to the
|
Hi there,
I've just noticed that this library depends on the
coreapi
which has been deprecated. What is the strategy going forward to work around this?As per the
coreapi
github page:The text was updated successfully, but these errors were encountered: