We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e4c28fc commit e3c7a51Copy full SHA for e3c7a51
example/settings/dev.py
@@ -1,9 +1,5 @@
1
import os
2
3
-from rest_framework import VERSION as DRFVERSION
4
-
5
-drf_version = tuple(int(x) for x in DRFVERSION.split('.'))
6
7
SITE_ID = 1
8
DEBUG = True
9
@@ -93,6 +89,7 @@
93
89
'rest_framework.renderers.BrowsableAPIRenderer',
94
90
),
95
91
'DEFAULT_METADATA_CLASS': 'rest_framework_json_api.metadata.JSONAPIMetadata',
92
+ 'DEFAULT_SCHEMA_CLASS': 'rest_framework_json_api.schemas.openapi.AutoSchema',
96
'DEFAULT_FILTER_BACKENDS': (
97
'rest_framework_json_api.filters.OrderingFilter',
98
'rest_framework_json_api.django_filters.DjangoFilterBackend',
@@ -104,6 +101,3 @@
104
101
105
102
'TEST_REQUEST_DEFAULT_FORMAT': 'vnd.api+json'
106
103
}
107
108
-if drf_version >= (3, 10):
109
- REST_FRAMEWORK['DEFAULT_SCHEMA_CLASS'] = 'rest_framework_json_api.schemas.openapi.AutoSchema'
0 commit comments