{
    "openapi": "3.0.0",
    "info": {
        "title": "中药大全 - API文档",
        "version": "1.0.0",
        "description": "中草药特性说明接口，返回别名、植物形态、采集、功能主治、来源等数据。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/zhongyao\/index": {
            "get": {
                "summary": "中药名称查询",
                "tags": [
                    "中药大全"
                ],
                "description": "根据重要名称查询对应功效等信息",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "num",
                        "in": "query",
                        "description": "默认数量",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 1,
                            "description": "默认数量"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "翻页",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 1,
                            "description": "翻页"
                        }
                    },
                    {
                        "name": "word",
                        "in": "query",
                        "description": "草药名称",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "金银花",
                            "description": "草药名称"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "title": {
                                            "type": "string",
                                            "example": "金银花",
                                            "description": "中草药名称"
                                        },
                                        "content": {
                                            "type": "string",
                                            "example": "花蕾棒状，略弯曲......",
                                            "description": "内容"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "title": "金银花─山银花",
                                        "content": "【中文名】：金银花─山银花 【类别】：花类 【英文名】：WildHoneysuckleFlower 【别名】：山金银花、土忍冬、土银花。  【来源】：为忍冬科植物山银花LonicaraconfusaDC.的花蕾或带初开的花。  【采制】：同金银花。  【性味】：花蕾棒状，略弯曲，长1～3cm。表面红棕色或灰棕色，唇部与冠部近相等，被短糙毛，萼筒亦密生灰白色或淡黄色小硬毛。气清香，味微苦。  【植物形态】：木质藤本，长2～4m。树皮黄褐色渐次变为白色，嫩时有短柔毛。叶对生，卵圆形至椭圆形，长4～8cm，宽3.5～5cm，上面绿色，主脉上有短疏毛，下面带灰白色，密生白色短柔毛；花冠管状，长1.6～2cm，稍被柔毛，初开时白色，后变黄色。花期6～9月，果期10～11月。  【生长地】：生于溪边、旷野疏林下或灌木丛中。产于四川、广东、广西、湖南、贵州、云南。  【化学成份】：含挥发油，其中有双花醇；并含氯原酸、异氯原酸等。  【功能主治】：同金银花。  "
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "中药名称查询",
                "tags": [
                    "中药大全"
                ],
                "description": "根据重要名称查询对应功效等信息",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "num": {
                                        "type": "int",
                                        "example": 1,
                                        "description": "默认数量"
                                    },
                                    "page": {
                                        "type": "int",
                                        "example": 1,
                                        "description": "翻页"
                                    },
                                    "word": {
                                        "type": "string",
                                        "example": "金银花",
                                        "description": "草药名称"
                                    }
                                },
                                "required": [
                                    "key",
                                    "word"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "title": {
                                            "type": "string",
                                            "example": "金银花",
                                            "description": "中草药名称"
                                        },
                                        "content": {
                                            "type": "string",
                                            "example": "花蕾棒状，略弯曲......",
                                            "description": "内容"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "title": "金银花─山银花",
                                        "content": "【中文名】：金银花─山银花 【类别】：花类 【英文名】：WildHoneysuckleFlower 【别名】：山金银花、土忍冬、土银花。  【来源】：为忍冬科植物山银花LonicaraconfusaDC.的花蕾或带初开的花。  【采制】：同金银花。  【性味】：花蕾棒状，略弯曲，长1～3cm。表面红棕色或灰棕色，唇部与冠部近相等，被短糙毛，萼筒亦密生灰白色或淡黄色小硬毛。气清香，味微苦。  【植物形态】：木质藤本，长2～4m。树皮黄褐色渐次变为白色，嫩时有短柔毛。叶对生，卵圆形至椭圆形，长4～8cm，宽3.5～5cm，上面绿色，主脉上有短疏毛，下面带灰白色，密生白色短柔毛；花冠管状，长1.6～2cm，稍被柔毛，初开时白色，后变黄色。花期6～9月，果期10～11月。  【生长地】：生于溪边、旷野疏林下或灌木丛中。产于四川、广东、广西、湖南、贵州、云南。  【化学成份】：含挥发油，其中有双花醇；并含氯原酸、异氯原酸等。  【功能主治】：同金银花。  "
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}