File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -236,10 +236,16 @@ def get_paginated_response_schema(self, schema):
236
236
'next' : {
237
237
'type' : 'string' ,
238
238
'nullable' : True ,
239
+ 'format' : 'uri' ,
240
+ 'example' : 'http://api.example.org/accounts/?{page_query_param}=4' .format (
241
+ page_query_param = self .page_query_param )
239
242
},
240
243
'previous' : {
241
244
'type' : 'string' ,
242
245
'nullable' : True ,
246
+ 'format' : 'uri' ,
247
+ 'example' : 'http://api.example.org/accounts/?{page_query_param}=2' .format (
248
+ page_query_param = self .page_query_param )
243
249
},
244
250
'results' : schema ,
245
251
},
@@ -403,10 +409,16 @@ def get_paginated_response_schema(self, schema):
403
409
'next' : {
404
410
'type' : 'string' ,
405
411
'nullable' : True ,
412
+ 'format' : 'uri' ,
413
+ 'example' : 'http://api.example.org/accounts/?{offset_param}=400&{limit_param}=100' .format (
414
+ offset_param = self .offset_query_param , limit_param = self .limit_query_param ),
406
415
},
407
416
'previous' : {
408
417
'type' : 'string' ,
409
418
'nullable' : True ,
419
+ 'format' : 'uri' ,
420
+ 'example' : 'http://api.example.org/accounts/?{offset_param}=200&{limit_param}=100' .format (
421
+ offset_param = self .offset_query_param , limit_param = self .limit_query_param ),
410
422
},
411
423
'results' : schema ,
412
424
},
Original file line number Diff line number Diff line change @@ -281,10 +281,14 @@ def test_get_paginated_response_schema(self):
281
281
'next' : {
282
282
'type' : 'string' ,
283
283
'nullable' : True ,
284
+ 'format' : 'uri' ,
285
+ 'example' : 'http://api.example.org/accounts/?page=4' ,
284
286
},
285
287
'previous' : {
286
288
'type' : 'string' ,
287
289
'nullable' : True ,
290
+ 'format' : 'uri' ,
291
+ 'example' : 'http://api.example.org/accounts/?page=2' ,
288
292
},
289
293
'results' : unpaginated_schema ,
290
294
},
@@ -588,10 +592,14 @@ def test_get_paginated_response_schema(self):
588
592
'next' : {
589
593
'type' : 'string' ,
590
594
'nullable' : True ,
595
+ 'format' : 'uri' ,
596
+ 'example' : 'http://api.example.org/accounts/?offset=400&limit=100' ,
591
597
},
592
598
'previous' : {
593
599
'type' : 'string' ,
594
600
'nullable' : True ,
601
+ 'format' : 'uri' ,
602
+ 'example' : 'http://api.example.org/accounts/?offset=200&limit=100' ,
595
603
},
596
604
'results' : unpaginated_schema ,
597
605
},
You can’t perform that action at this time.
0 commit comments