0
@swagger_auto_schema(method = "post", request_body = openapi.Schema(type = openapi.TYPE_OBJECT, 
    properties = {
        "OrganizationLogo": openapi.Schema(type = openapi.TYPE_FILE, description = "Logo of Organization")
    }))
@api_view(['POST'])
@parser_classes([FileUploadParser])
@decorators.permission_classes([permissions.AllowAny])
def CreateOrganization(request):
    ...

即使在定义 @parser_classes([FileUploadParser]) 之后,我也无法在 Swagger-UI 中获取文件上传按钮。请帮忙..!

4

0 回答 0