You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on #450 I discovered that the /v1/schema/swagger-ui/ does not work anymore. I went thru the commit history to find out what cause the issue and figured out that its caused by:
It somehow override the DEFAULT_SCHEMA_CLASS that we are setting in the REST_FRAMEWORK dictionary.
>>> from rest_framework.settings import api_settings
>>> api_settings.DEFAULT_SCHEMA_CLASS
<class 'rest_framework.schemas.openapi.AutoSchema'>
When I remove django_stubs_ex, than we are getting the right result.
>>> from rest_framework.settings import api_settings
>>> api_settings.DEFAULT_SCHEMA_CLASS
<class 'drf_spectacular.openapi.AutoSchema'>
I found a open issue on djang-stubs with the same problem. Any ideas on how we could solve that?
We could wait and see if the issue gets resolved or in case we need SwaggerUI soon, we could adjust mypy. We could change the settings on generics and remove the monekypatch().
We could also discover issues like this with testing our endpoints. The page currently returns a HTTP 500 status code.
Terms
Behavior
While working on #450 I discovered that the
/v1/schema/swagger-ui/
does not work anymore. I went thru the commit history to find out what cause the issue and figured out that its caused by:It somehow override the DEFAULT_SCHEMA_CLASS that we are setting in the REST_FRAMEWORK dictionary.
When I remove django_stubs_ex, than we are getting the right result.
I found a open issue on djang-stubs with the same problem. Any ideas on how we could solve that?
We could wait and see if the issue gets resolved or in case we need SwaggerUI soon, we could adjust mypy. We could change the settings on generics and remove the monekypatch().
We could also discover issues like this with testing our endpoints. The page currently returns a HTTP 500 status code.
The text was updated successfully, but these errors were encountered: