[Fixed]-Why swagger raises unclear error โ€“ Django

47๐Ÿ‘

โœ…

I ran into the same issue, the fix is described here: https://www.django-rest-framework.org/community/3.10-announcement/

To summarize, Django Rest Framework 3.10 (released a few days ago) deprecated the CoreAPI based schema generation, and introduced the OpenAPI schema generation in its place. Currently to continue to use django-rest-swagger as is you need to re-enable the CoreAPI schema generation by adding the following config to the settings file:

REST_FRAMEWORK = { ... 'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.coreapi.AutoSchema' }
๐Ÿ‘คAseel Ashraf

Leave a comment