{
    "openapi": "3.0.0",
    "info": {
        "title": "BFR体脂率 - API文档",
        "version": "1.0.0",
        "description": "通过国际权威的标准体脂率指数（BFR）计算身材是否标准以及健康风险，成年人正常体脂率和性别及年龄都有一定关系，本接口可以快速估算理想范围。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/bfrsum\/index": {
            "get": {
                "summary": "理想体脂率估算",
                "tags": [
                    "BFR体脂率"
                ],
                "description": "身材指数查询减肥增肌每一天",
                "parameters": [
                    {
                        "name": "age",
                        "in": "query",
                        "description": "年龄",
                        "required": true,
                        "schema": {
                            "type": "int",
                            "example": 30,
                            "description": "年龄"
                        }
                    },
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "sex",
                        "in": "query",
                        "description": "0为女性，1为男性",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 1,
                            "description": "0为女性，1为男性"
                        }
                    },
                    {
                        "name": "height",
                        "in": "query",
                        "description": "身高，单位厘米(cm)",
                        "required": true,
                        "schema": {
                            "type": "int",
                            "example": 172,
                            "description": "身高，单位厘米(cm)"
                        }
                    },
                    {
                        "name": "weight",
                        "in": "query",
                        "description": "体重，单位千克(kg)",
                        "required": true,
                        "schema": {
                            "type": "int",
                            "example": 58,
                            "description": "体重，单位千克(kg)"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "bfr": {
                                            "type": "string",
                                            "example": "14%",
                                            "description": "当前体脂率"
                                        },
                                        "tip": {
                                            "type": "string",
                                            "example": "体脂率较为理想，请继续保持健康的作息和饮食方式。",
                                            "description": "身材小贴士"
                                        },
                                        "healthy": {
                                            "type": "string",
                                            "example": "风险较低",
                                            "description": "健康风险"
                                        },
                                        "normbfr": {
                                            "type": "string",
                                            "example": "14%~20%",
                                            "description": "正常体脂率范围"
                                        },
                                        "normweight": {
                                            "type": "string",
                                            "example": "59~72",
                                            "description": "正常体重范围"
                                        },
                                        "idealweight": {
                                            "type": "int",
                                            "example": 65,
                                            "description": "标准体重"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "bfr": "14%",
                                        "tip": "体脂率较为理想，请继续保持健康的作息和饮食方式。",
                                        "healthy": "风险较低",
                                        "normbfr": "14%-20%",
                                        "normweight": "59~72",
                                        "idealweight": 65
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "理想体脂率估算",
                "tags": [
                    "BFR体脂率"
                ],
                "description": "身材指数查询减肥增肌每一天",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "age": {
                                        "type": "int",
                                        "example": 30,
                                        "description": "年龄"
                                    },
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "sex": {
                                        "type": "int",
                                        "example": 1,
                                        "description": "0为女性，1为男性"
                                    },
                                    "height": {
                                        "type": "int",
                                        "example": 172,
                                        "description": "身高，单位厘米(cm)"
                                    },
                                    "weight": {
                                        "type": "int",
                                        "example": 58,
                                        "description": "体重，单位千克(kg)"
                                    }
                                },
                                "required": [
                                    "age",
                                    "key",
                                    "height",
                                    "weight"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "bfr": {
                                            "type": "string",
                                            "example": "14%",
                                            "description": "当前体脂率"
                                        },
                                        "tip": {
                                            "type": "string",
                                            "example": "体脂率较为理想，请继续保持健康的作息和饮食方式。",
                                            "description": "身材小贴士"
                                        },
                                        "healthy": {
                                            "type": "string",
                                            "example": "风险较低",
                                            "description": "健康风险"
                                        },
                                        "normbfr": {
                                            "type": "string",
                                            "example": "14%~20%",
                                            "description": "正常体脂率范围"
                                        },
                                        "normweight": {
                                            "type": "string",
                                            "example": "59~72",
                                            "description": "正常体重范围"
                                        },
                                        "idealweight": {
                                            "type": "int",
                                            "example": 65,
                                            "description": "标准体重"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "bfr": "14%",
                                        "tip": "体脂率较为理想，请继续保持健康的作息和饮食方式。",
                                        "healthy": "风险较低",
                                        "normbfr": "14%-20%",
                                        "normweight": "59~72",
                                        "idealweight": 65
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}