如何设置APIFlask入参字段为嵌套字段?

代码

from apiflask import APIFlask, Schema
from apiflask.fields import String, Nested

app = APIFlask(__name__)


class InSchema(Schema):
    a = String()
    b = String()


@app.post('/')
@app.input(dict(
    detail=Nested(InSchema),
), location='json_or_form')
def index(data):
    print(data)
    return 'success'


if __name__ == '__main__':
    app.run()

运行

报错

{
    "detail": {
        "json_or_form": {
            "detail": {
                "_schema": [
                    "Invalid input type."
                ]
            }
        }
    },
    "message": "Validation error"
}

这样即可,看来嵌套类型只能用json用不了form