drf-yasg icon indicating copy to clipboard operation
drf-yasg copied to clipboard

Support nested coreschema in CoreAPI compat layer

Open khomyakov42 opened this issue 6 years ago • 1 comments

class MyFilterBackend(BaseFilterBackend):
   def get_schema_fields(self, view):
      return [coreapi.Field(
         name="values"
         required=False, 
         schema=coreschema.Array(items=coreschema.Integer(), unique_items=True), 
         location='query'
      )]

Result: 2019-01-22 18-18-05

khomyakov42 avatar Jan 22 '19 08:01 khomyakov42

This is not currently supported. While it would be nice, the way to do it now is to create a FilterInspector.

axnsan12 avatar Jan 22 '19 08:01 axnsan12