{
    "openapi": "3.0.0",
    "info": {
        "title": "填对诗词 - API文档",
        "version": "1.0.0",
        "description": "随机返回一句古诗词，包含问题（一般为前半句）和答案（下半句）及诗词来源。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/duishici\/index": {
            "get": {
                "summary": "填对诗词",
                "tags": [
                    "填对诗词"
                ],
                "description": "默认随机返回一条诗词带答案",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "quest": {
                                            "type": "string",
                                            "example": "沉舟侧畔千帆过",
                                            "description": "问题，一般为诗词前部分"
                                        },
                                        "answer": {
                                            "type": "string",
                                            "example": "病树前头万木春",
                                            "description": "答案，要接上的部分"
                                        },
                                        "source": {
                                            "type": "string",
                                            "example": "刘禹锡 酬乐天杨州初逢席上见赠",
                                            "description": "诗词来源"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "quest": "沉舟侧畔千帆过",
                                        "answer": "病树前头万木春",
                                        "source": "刘禹锡 酬乐天杨州初逢席上见赠"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "填对诗词",
                "tags": [
                    "填对诗词"
                ],
                "description": "默认随机返回一条诗词带答案",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    }
                                },
                                "required": [
                                    "key"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "quest": {
                                            "type": "string",
                                            "example": "沉舟侧畔千帆过",
                                            "description": "问题，一般为诗词前部分"
                                        },
                                        "answer": {
                                            "type": "string",
                                            "example": "病树前头万木春",
                                            "description": "答案，要接上的部分"
                                        },
                                        "source": {
                                            "type": "string",
                                            "example": "刘禹锡 酬乐天杨州初逢席上见赠",
                                            "description": "诗词来源"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "quest": "沉舟侧畔千帆过",
                                        "answer": "病树前头万木春",
                                        "source": "刘禹锡 酬乐天杨州初逢席上见赠"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}