// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2019-05-15 17:30:16.6310762 +0800 CST m=+5.150093201

package docs

import (
	"bytes"

	"github.com/alecthomas/template"
	"github.com/swaggo/swag"
)

var doc = `{
    "swagger": "2.0",
    "info": {
        "description": "{{.Description}}",
        "title": "{{.Title}}",
        "contact": {},
        "license": {},
        "version": "{{.Version}}"
    },
    "host": "{{.Host}}",
    "basePath": "{{.BasePath}}",
    "paths": {
        "/api/captchas": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "captchas"
                ],
                "summary": "图片验证码",
                "parameters": [
                    {
                        "description": "手机号",
                        "name": "phone",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object",
                            "$ref": "#/definitions/captcha.storeParams"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "{\"captcha_image_content\": \"http://localhost:8889/captcha/izzUb7f1mYEsi5wModz5.png\",\"captcha_key\": \"captcha_W4PtXdQQ6KFXvs3\",\"expired_at\": \"2019-05-15 17:23:21\"}",
                        "schema": {
                            "type": "object",
                            "$ref": "#/definitions/controllers.Response"
                        }
                    }
                }
            }
        },
        "/api/socials/authorizations/{social_type}": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "authorization"
                ],
                "summary": "第三方登录",
                "parameters": [
                    {
                        "type": "string",
                        "description": "social_type in [weixin]",
                        "name": "social_type",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "微信 access_token openid 和 code，要么传 access_token openid 要么只传 code",
                        "name": "json",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object",
                            "$ref": "#/definitions/authorization.Authorization"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "{\"token\": 1}",
                        "schema": {
                            "type": "object",
                            "$ref": "#/definitions/controllers.Response"
                        }
                    }
                }
            }
        },
        "/api/users": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "users"
                ],
                "summary": "用户注册",
                "parameters": [
                    {
                        "description": "req",
                        "name": "req",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object",
                            "$ref": "#/definitions/user.User"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "{}",
                        "schema": {
                            "type": "object",
                            "$ref": "#/definitions/controllers.Response"
                        }
                    }
                }
            }
        },
        "/api/verificationCodes": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "verificationCodes"
                ],
                "summary": "发送短信",
                "parameters": [
                    {
                        "description": "req",
                        "name": "req",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object",
                            "$ref": "#/definitions/vericode.VerificationCode"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "{\"key\": \"verificationCode_xxxxx\",\"debug_sms_result\": \"xxxx\",\"expired_at\": \"2019-05-15 17:23:21\"}",
                        "schema": {
                            "type": "object",
                            "$ref": "#/definitions/controllers.Response"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "authorization.Authorization": {
            "type": "object",
            "properties": {
                "access_token": {
                    "type": "string"
                },
                "code": {
                    "type": "string"
                },
                "openid": {
                    "type": "string"
                }
            }
        },
        "captcha.storeParams": {
            "type": "object",
            "properties": {
                "phone": {
                    "type": "string"
                }
            }
        },
        "controllers.Response": {
            "type": "object",
            "properties": {
                "code": {
                    "description": "自定义的异常码",
                    "type": "integer"
                },
                "data": {
                    "description": "具体响应数据\n- 无数据时，默认返回一个 {}\n- 如果是列表数据建议使用 ListData 类型\n- 不需分页的列表类型时，也建议 data.list 这样响应",
                    "type": "object"
                },
                "errors": {
                    "description": "具体错误信息\n- 只用于调试的，前端不应使用该值，因为其可能会不存在",
                    "type": "object"
                },
                "message": {
                    "description": "错误描述",
                    "type": "string"
                }
            }
        },
        "user.User": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                },
                "password": {
                    "type": "string"
                },
                "verification_code": {
                    "type": "string"
                },
                "verification_key": {
                    "type": "string"
                }
            }
        },
        "vericode.VerificationCode": {
            "type": "object",
            "properties": {
                "captcha_code": {
                    "type": "string"
                },
                "captcha_key": {
                    "type": "string"
                }
            }
        }
    }
}`

type swaggerInfo struct {
	Version     string
	Host        string
	BasePath    string
	Title       string
	Description string
}

// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo swaggerInfo

type s struct{}

func (s *s) ReadDoc() string {
	t, err := template.New("swagger_info").Parse(doc)
	if err != nil {
		return doc
	}

	var tpl bytes.Buffer
	if err := t.Execute(&tpl, SwaggerInfo); err != nil {
		return doc
	}

	return tpl.String()
}

func init() {
	swag.Register(swag.Name, &s{})
}
