dictionary
次のようなポストコールデータで受け取った APIとして、restplus Api.model として表す方法を探しています
{"name": "the_name",
"data": {"data_specific_key", "value", "key2": "value2" .... }
}
// The data is dynamic, no way to know what fields will have.
残念ながら、restplus Api には、ListFields を表す方法しかありません。
https://flask-restplus.readthedocs.io/en/stable/marshalling.html#nested-fieldを見ていますが、役立つかどうかはわかりません。おそらく、 https://flask-restplus.readthedocsをサブクラス化する必要があります。 io/en/stable/api.html#flask_restplus.fields.Rawで自分のフィールドを作ってください、ありがとう。