@@ -151,12 +151,6 @@ def to_html(self): # pragma: no cover
151
151
def get_results (self , data ):
152
152
return data ['results' ]
153
153
154
- def get_schema_fields (self , view ):
155
- assert coreapi is not None , 'coreapi must be installed to use `get_schema_fields()`'
156
- if coreapi is not None :
157
- warnings .warn ('CoreAPI compatibility is deprecated and will be removed in DRF 3.17' , RemovedInDRF317Warning )
158
- return []
159
-
160
154
def get_schema_operation_parameters (self , view ):
161
155
return []
162
156
@@ -313,36 +307,6 @@ def to_html(self):
313
307
context = self .get_html_context ()
314
308
return template .render (context )
315
309
316
- def get_schema_fields (self , view ):
317
- assert coreapi is not None , 'coreapi must be installed to use `get_schema_fields()`'
318
- if coreapi is not None :
319
- warnings .warn ('CoreAPI compatibility is deprecated and will be removed in DRF 3.17' , RemovedInDRF317Warning )
320
- assert coreschema is not None , 'coreschema must be installed to use `get_schema_fields()`'
321
- fields = [
322
- coreapi .Field (
323
- name = self .page_query_param ,
324
- required = False ,
325
- location = 'query' ,
326
- schema = coreschema .Integer (
327
- title = 'Page' ,
328
- description = force_str (self .page_query_description )
329
- )
330
- )
331
- ]
332
- if self .page_size_query_param is not None :
333
- fields .append (
334
- coreapi .Field (
335
- name = self .page_size_query_param ,
336
- required = False ,
337
- location = 'query' ,
338
- schema = coreschema .Integer (
339
- title = 'Page size' ,
340
- description = force_str (self .page_size_query_description )
341
- )
342
- )
343
- )
344
- return fields
345
-
346
310
def get_schema_operation_parameters (self , view ):
347
311
parameters = [
348
312
{
@@ -530,32 +494,6 @@ def get_count(self, queryset):
530
494
except (AttributeError , TypeError ):
531
495
return len (queryset )
532
496
533
- def get_schema_fields (self , view ):
534
- assert coreapi is not None , 'coreapi must be installed to use `get_schema_fields()`'
535
- if coreapi is not None :
536
- warnings .warn ('CoreAPI compatibility is deprecated and will be removed in DRF 3.17' , RemovedInDRF317Warning )
537
- assert coreschema is not None , 'coreschema must be installed to use `get_schema_fields()`'
538
- return [
539
- coreapi .Field (
540
- name = self .limit_query_param ,
541
- required = False ,
542
- location = 'query' ,
543
- schema = coreschema .Integer (
544
- title = 'Limit' ,
545
- description = force_str (self .limit_query_description )
546
- )
547
- ),
548
- coreapi .Field (
549
- name = self .offset_query_param ,
550
- required = False ,
551
- location = 'query' ,
552
- schema = coreschema .Integer (
553
- title = 'Offset' ,
554
- description = force_str (self .offset_query_description )
555
- )
556
- )
557
- ]
558
-
559
497
def get_schema_operation_parameters (self , view ):
560
498
parameters = [
561
499
{
@@ -933,36 +871,6 @@ def to_html(self):
933
871
context = self .get_html_context ()
934
872
return template .render (context )
935
873
936
- def get_schema_fields (self , view ):
937
- assert coreapi is not None , 'coreapi must be installed to use `get_schema_fields()`'
938
- if coreapi is not None :
939
- warnings .warn ('CoreAPI compatibility is deprecated and will be removed in DRF 3.17' , RemovedInDRF317Warning )
940
- assert coreschema is not None , 'coreschema must be installed to use `get_schema_fields()`'
941
- fields = [
942
- coreapi .Field (
943
- name = self .cursor_query_param ,
944
- required = False ,
945
- location = 'query' ,
946
- schema = coreschema .String (
947
- title = 'Cursor' ,
948
- description = force_str (self .cursor_query_description )
949
- )
950
- )
951
- ]
952
- if self .page_size_query_param is not None :
953
- fields .append (
954
- coreapi .Field (
955
- name = self .page_size_query_param ,
956
- required = False ,
957
- location = 'query' ,
958
- schema = coreschema .Integer (
959
- title = 'Page size' ,
960
- description = force_str (self .page_size_query_description )
961
- )
962
- )
963
- )
964
- return fields
965
-
966
874
def get_schema_operation_parameters (self , view ):
967
875
parameters = [
968
876
{
0 commit comments