{
    "openapi": "3.0.0",
    "info": {
        "title": "垃圾分类问答 - API文档",
        "version": "1.0.0",
        "description": "垃圾分类问答判断题，每次调用接口返回一个废弃物名称及正确分类。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/anslajifenlei\/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": {
                                        "name": {
                                            "type": "string",
                                            "example": "西红柿",
                                            "description": "垃圾物品"
                                        },
                                        "type": {
                                            "type": "int",
                                            "example": 2,
                                            "description": "\t垃圾分类，0为可回收、1为有害、2为厨余(湿)、3为其他(干)"
                                        },
                                        "explain": {
                                            "type": "string",
                                            "example": "湿垃圾",
                                            "description": "中文释义"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "name": "西红柿",
                                        "type": 2,
                                        "explain": "湿垃圾"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "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": {
                                        "name": {
                                            "type": "string",
                                            "example": "西红柿",
                                            "description": "垃圾物品"
                                        },
                                        "type": {
                                            "type": "int",
                                            "example": 2,
                                            "description": "\t垃圾分类，0为可回收、1为有害、2为厨余(湿)、3为其他(干)"
                                        },
                                        "explain": {
                                            "type": "string",
                                            "example": "湿垃圾",
                                            "description": "中文释义"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "name": "西红柿",
                                        "type": 2,
                                        "explain": "湿垃圾"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}