sil*_*iud 2 python flask flask-restplus
我正在寻找将restplus Api.model表示为a的方式dictionary,我在诸如以下的调用数据上收到的api
{"name": "the_name",
"data": {"data_specific_key", "value", "key2": "value2" .... }
}
// The data is dynamic, no way to know what fields will have.
Run Code Online (Sandbox Code Playgroud)
不幸的是,在restplus Api中,我只有一种表示ListFields的方法。
我正在查看https://flask-restplus.readthedocs.io/en/stable/marshalling.html#nested-field,但不确定会有所帮助,也许我需要将https://flask-restplus.readthedocs子类化。 io / zh-CN / stable / api.html#flask_restplus.fields.Raw,请创建我自己的字段,谢谢。