Is there a possibility to set property to swagger_auto_schema request_body please?

Viewed 89

I want to pass a list to admin parameter at the bottom, but it ask to set items and I do not know how ? It get an error

@swagger_auto_schema(
    operation_description="Modification d'une boutique d'un utilisateur",
    method='PUT',
    request_body=openapi.Schema(
        type=openapi.TYPE_OBJECT,
        properties={
            'name': openapi.Schema(type=openapi.TYPE_STRING, description='string'),
            'description': openapi.Schema(type=openapi.TYPE_STRING, description='string'),
            'logo': openapi.Schema(type=openapi.TYPE_FILE, description='file'),
            'cover_picture': openapi.Schema(type=openapi.TYPE_FILE, description='file'),
            'category': openapi.Schema(type=openapi.TYPE_STRING, description='string'),
            'phone_number': openapi.Schema(type=openapi.TYPE_STRING, description='string'),
            'email': openapi.Schema(type=openapi.TYPE_STRING, description='string'),
            'coords_lat': openapi.Schema(type=openapi.TYPE_STRING, description='string'),
            'coords_lng': openapi.Schema(type=openapi.TYPE_STRING, description='string'),
            'audio': openapi.Schema(type=openapi.TYPE_FILE, description='file'),
            'address': openapi.Schema(type=openapi.TYPE_STRING, description='string'),
            'admin': openapi.Schema(type=openapi.TYPE_ARRAY, description='array', 
            items=UsersSerializer),
        }
    )
)

0 Answers
Related