王新阳

wangxinyang

apifox.com之通过JSON Schema设置数组类型的复杂form_data参数

{
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "goods_type": {
                "type": "string",
                "title": "材料类型",
                "enum": [
                    "material",
                    "semifinished"
                ],
                "x-apifox": {
                    "enumDescriptions": {
                        "material": "原料",
                        "semifinished": "原料型产品"
                    }
                }
            },
            "goods_classid": {
                "type": "integer",
                "title": "材料类别id"
            },
            "goods_name": {
                "type": "string",
                "title": "材料名称",
                "description": "仅原料型产品有"
            },
            "goods_weight": {
                "type": "number",
                "title": "材料重量",
                "description": "最多三位小数,单位:t"
            }
        },
        "required": [
            "goods_type",
            "goods_classid",
            "goods_weight"
        ],
        "x-apifox-orders": [
            "goods_type",
            "goods_classid",
            "goods_name",
            "goods_weight"
        ]
    }
}
2024-07-29
2024-09-17 星期二 农历八月十五