{
    "openapi": "3.0.0",
    "info": {
        "title": "雷人笑话 - API文档",
        "version": "1.0.0",
        "description": "随机显示一句笑话，给偶尔枯燥的工作和生活，带来不经意的会心一笑。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/joke\/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": true,
                        "schema": {
                            "type": "int",
                            "example": 10,
                            "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": {
                                        "list": [
                                            {
                                                "title": "容易化学",
                                                "content": "一日在机场碰到一位同乡，他问起我在国外学什么的，我说：“溶液化学。”他说：“老兄客气了，哪有容易的化学。”"
                                            },
                                            {
                                                "title": "校长发火",
                                                "content": "校长在学期结束时的校务会议上，对人事行政效率之低，大发雷霆。他说：“负责董事业务的不懂事；负责人事管理的不省人事；身为干事的又不干事！”"
                                            },
                                            {
                                                "title": "象形字",
                                                "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": "返回数量"
                                    }
                                },
                                "required": [
                                    "key",
                                    "num"
                                ]
                            }
                        }
                    }
                },
                "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": {
                                        "list": [
                                            {
                                                "title": "容易化学",
                                                "content": "一日在机场碰到一位同乡，他问起我在国外学什么的，我说：“溶液化学。”他说：“老兄客气了，哪有容易的化学。”"
                                            },
                                            {
                                                "title": "校长发火",
                                                "content": "校长在学期结束时的校务会议上，对人事行政效率之低，大发雷霆。他说：“负责董事业务的不懂事；负责人事管理的不省人事；身为干事的又不干事！”"
                                            },
                                            {
                                                "title": "象形字",
                                                "content": "某人于婚礼上送一横匾，上书：“北比臼舅”四字，旁人皆不解其意。那人解释说：“北字正如二人互不相识时背靠背的样子；比是一个向另一个开展追求的样子；臼是二人面对面互相倾谈的样子；舅字是二人合作生下一男的样子。”众人一听，大声叫绝！"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}