{
    "openapi": "3.0.0",
    "info": {
        "title": "成语填字 - API文档",
        "version": "1.0.0",
        "description": "成语填空题调用接口可获取结构化数据：一个四字成语中随机隐藏一字，并附带 1 个正确选项 + 3 个干扰项（基于音近、形似或义近策略生成）以及完整答案和词语解释。适用于文字游戏、教育类应用，助力高效构建中文语言智能练习场景。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/idiomquiz\/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": {
                                        "diff": {
                                            "type": "int",
                                            "example": 1,
                                            "description": "难度：一般1、中等2、困难3"
                                        },
                                        "full": {
                                            "type": "string",
                                            "example": "不假思索",
                                            "description": "完整答案"
                                        },
                                        "explan": {
                                            "type": "string",
                                            "example": "用不着思考，形容说话做事迅速。",
                                            "description": "成语解释"
                                        },
                                        "correct": {
                                            "type": "string",
                                            "example": "索",
                                            "description": "正确答案"
                                        },
                                        "wrong_a": {
                                            "type": "string",
                                            "example": "锁",
                                            "description": "错误选项A"
                                        },
                                        "wrong_b": {
                                            "type": "string",
                                            "example": "所",
                                            "description": "错误选项B"
                                        },
                                        "wrong_c": {
                                            "type": "string",
                                            "example": "琐",
                                            "description": "错误选项C"
                                        },
                                        "question": {
                                            "type": "string",
                                            "example": "不假思（）",
                                            "description": "题目"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "diff": 1,
                                        "full": "不假思索",
                                        "explan": "用不着思考，形容说话做事迅速。",
                                        "correct": "索",
                                        "wrong_a": "锁",
                                        "wrong_b": "所",
                                        "wrong_c": "琐",
                                        "question": "不假思（）"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "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": {
                                        "diff": {
                                            "type": "int",
                                            "example": 1,
                                            "description": "难度：一般1、中等2、困难3"
                                        },
                                        "full": {
                                            "type": "string",
                                            "example": "不假思索",
                                            "description": "完整答案"
                                        },
                                        "explan": {
                                            "type": "string",
                                            "example": "用不着思考，形容说话做事迅速。",
                                            "description": "成语解释"
                                        },
                                        "correct": {
                                            "type": "string",
                                            "example": "索",
                                            "description": "正确答案"
                                        },
                                        "wrong_a": {
                                            "type": "string",
                                            "example": "锁",
                                            "description": "错误选项A"
                                        },
                                        "wrong_b": {
                                            "type": "string",
                                            "example": "所",
                                            "description": "错误选项B"
                                        },
                                        "wrong_c": {
                                            "type": "string",
                                            "example": "琐",
                                            "description": "错误选项C"
                                        },
                                        "question": {
                                            "type": "string",
                                            "example": "不假思（）",
                                            "description": "题目"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "diff": 1,
                                        "full": "不假思索",
                                        "explan": "用不着思考，形容说话做事迅速。",
                                        "correct": "索",
                                        "wrong_a": "锁",
                                        "wrong_b": "所",
                                        "wrong_c": "琐",
                                        "question": "不假思（）"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}