{
    "openapi": "3.0.0",
    "info": {
        "title": "民俗对联 - API文档",
        "version": "1.0.0",
        "description": "对联又称门对、春联、楹联等，是中国传统文化瑰宝。一般为写在纸、布上或刻在木头、柱子上的对偶语句。本接口支持查询“春联、乔迁、开业、结婚、生子、人物、经典、民胜”等八个类型的对联。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/msdl\/index": {
            "get": {
                "summary": "民俗对联",
                "tags": [
                    "民俗对联"
                ],
                "description": "默认随机返回一句对联",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "num",
                        "in": "query",
                        "description": "返回数量，取值1-10",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 10,
                            "description": "返回数量，取值1-10"
                        }
                    },
                    {
                        "name": "fenlei",
                        "in": "query",
                        "description": "分类查询",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "春联",
                            "description": "分类查询"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "fenlei": {
                                            "type": "string",
                                            "example": "春联",
                                            "description": "对联分类"
                                        },
                                        "hengpi": {
                                            "type": "string",
                                            "example": "马到成功",
                                            "description": "横批（可能为空）"
                                        },
                                        "xialian": {
                                            "type": "string",
                                            "example": "春风得意四蹄轻",
                                            "description": "下联"
                                        },
                                        "shanglian": {
                                            "type": "string",
                                            "example": "好雨知时群卉盛",
                                            "description": "上联"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "fenlei": "春联",
                                                "hengpi": "马到成功",
                                                "xialian": "春风得意四蹄轻",
                                                "shanglian": "好雨知时群卉盛"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "民俗对联",
                "tags": [
                    "民俗对联"
                ],
                "description": "默认随机返回一句对联",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "num": {
                                        "type": "int",
                                        "example": 10,
                                        "description": "返回数量，取值1-10"
                                    },
                                    "fenlei": {
                                        "type": "string",
                                        "example": "春联",
                                        "description": "分类查询"
                                    }
                                },
                                "required": [
                                    "key"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "fenlei": {
                                            "type": "string",
                                            "example": "春联",
                                            "description": "对联分类"
                                        },
                                        "hengpi": {
                                            "type": "string",
                                            "example": "马到成功",
                                            "description": "横批（可能为空）"
                                        },
                                        "xialian": {
                                            "type": "string",
                                            "example": "春风得意四蹄轻",
                                            "description": "下联"
                                        },
                                        "shanglian": {
                                            "type": "string",
                                            "example": "好雨知时群卉盛",
                                            "description": "上联"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "fenlei": "春联",
                                                "hengpi": "马到成功",
                                                "xialian": "春风得意四蹄轻",
                                                "shanglian": "好雨知时群卉盛"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}