在flask_restplus Python 3中使用fields.Wildcard()时出现问题

在flask_restplus Python 3中使用fields.Wildcard()时出现问题,python,flask,swagger-ui,python-3.7,flask-restplus,Python,Flask,Swagger Ui,Python 3.7,Flask Restplus,我正在尝试为以下结构构建一个flask restplus模型 "data": { "file1": 79, "file2": 72 } file1和file2是文件名,每次运行应用程序时都会更改。我能想到的最佳解决方案是使用通配符字段 wild = fields.Wildcard(fields.String) wildcard_fields = {'*': wild} 当我运行时,我得到AttributeError:module

我正在尝试为以下结构构建一个flask restplus模型

"data": {
            "file1": 79,
            "file2": 72
        }
file1和file2是文件名,每次运行应用程序时都会更改。我能想到的最佳解决方案是使用通配符字段

wild = fields.Wildcard(fields.String)
wildcard_fields = {'*': wild}
当我运行时,我得到
AttributeError:module'flask\u restplus.fields'没有属性“通配符”

请帮助我解决这个问题,或任何其他解决方案也非常感谢


谢谢

您是否尝试更新您的库?通配符是最近出现的,所以可能是问题。

我尝试更新它们,但没有任何更改。我引用了这个链接“”并试图实现这些更改,但它们的代码是在python 2中编写的,我使用的是python 3.7,所以我也无法实现。目前,我已经将数据结构更改为不使用通配符字段,但我将在几天后再次尝试更新它,如果它有效,我将在这里发布它。