{
    "openapi": "3.0.0",
    "info": {
        "title": "优美诗句 - API文档",
        "version": "1.0.0",
        "description": "意境优美令人如痴如醉的诗词句，本接口同时支持输出来源和作者。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/verse\/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": "page",
                        "in": "query",
                        "description": "翻页",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 1,
                            "description": "翻页"
                        }
                    },
                    {
                        "name": "word",
                        "in": "query",
                        "description": "搜索词，来源或作者",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "李白",
                            "description": "搜索词，来源或作者"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "author": {
                                            "type": "string",
                                            "example": "杜甫",
                                            "description": "作者"
                                        },
                                        "source": {
                                            "type": "string",
                                            "example": "忆江南",
                                            "description": "来源"
                                        },
                                        "content": {
                                            "type": "string",
                                            "example": "日出江花红胜火，春来江水绿如蓝。",
                                            "description": "诗句"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "author": "白居易",
                                                "source": "忆江南",
                                                "content": "日出江花红胜火，春来江水绿如蓝。"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "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"
                                    },
                                    "page": {
                                        "type": "int",
                                        "example": 1,
                                        "description": "翻页"
                                    },
                                    "word": {
                                        "type": "string",
                                        "example": "李白",
                                        "description": "搜索词，来源或作者"
                                    }
                                },
                                "required": [
                                    "key"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "author": {
                                            "type": "string",
                                            "example": "杜甫",
                                            "description": "作者"
                                        },
                                        "source": {
                                            "type": "string",
                                            "example": "忆江南",
                                            "description": "来源"
                                        },
                                        "content": {
                                            "type": "string",
                                            "example": "日出江花红胜火，春来江水绿如蓝。",
                                            "description": "诗句"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "author": "白居易",
                                                "source": "忆江南",
                                                "content": "日出江花红胜火，春来江水绿如蓝。"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}