Browse Source

增加配置文件

kobe6258 6 months ago
parent
commit
f0a777d615

BIN
swagger.zip


BIN
swagger/favicon-16x16.png


BIN
swagger/favicon-32x32.png


+ 0 - 60
swagger/index.html

@@ -1,60 +0,0 @@
-<!-- HTML for static distribution bundle build -->
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <meta charset="UTF-8">
-    <title>Swagger UI</title>
-    <link rel="stylesheet" type="text/css" href="./swagger-ui.css" />
-    <link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
-    <link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
-    <style>
-      html
-      {
-        box-sizing: border-box;
-        overflow: -moz-scrollbars-vertical;
-        overflow-y: scroll;
-      }
-
-      *,
-      *:before,
-      *:after
-      {
-        box-sizing: inherit;
-      }
-
-      body
-      {
-        margin:0;
-        background: #fafafa;
-      }
-    </style>
-  </head>
-
-  <body>
-    <div id="swagger-ui"></div>
-
-    <script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
-    <script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
-    <script>
-    window.onload = function() {
-      // Begin Swagger UI call region
-      const ui = SwaggerUIBundle({
-        url: "https://petstore.swagger.io/v2/swagger.json",
-        dom_id: '#swagger-ui',
-        deepLinking: true,
-        presets: [
-          SwaggerUIBundle.presets.apis,
-          SwaggerUIStandalonePreset
-        ],
-        plugins: [
-          SwaggerUIBundle.plugins.DownloadUrl
-        ],
-        layout: "StandaloneLayout"
-      });
-      // End Swagger UI call region
-
-      window.ui = ui;
-    };
-  </script>
-  </body>
-</html>

+ 0 - 79
swagger/oauth2-redirect.html

@@ -1,79 +0,0 @@
-<!doctype html>
-<html lang="en-US">
-<head>
-    <title>Swagger UI: OAuth2 Redirect</title>
-</head>
-<body>
-<script>
-    'use strict';
-    function run () {
-        var oauth2 = window.opener.swaggerUIRedirectOauth2;
-        var sentState = oauth2.state;
-        var redirectUrl = oauth2.redirectUrl;
-        var isValid, qp, arr;
-
-        if (/code|token|error/.test(window.location.hash)) {
-            qp = window.location.hash.substring(1);
-        } else {
-            qp = location.search.substring(1);
-        }
-
-        arr = qp.split("&");
-        arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
-        qp = qp ? JSON.parse('{' + arr.join() + '}',
-                function (key, value) {
-                    return key === "" ? value : decodeURIComponent(value);
-                }
-        ) : {};
-
-        isValid = qp.state === sentState;
-
-        if ((
-          oauth2.auth.schema.get("flow") === "accessCode" ||
-          oauth2.auth.schema.get("flow") === "authorizationCode" ||
-          oauth2.auth.schema.get("flow") === "authorization_code"
-        ) && !oauth2.auth.code) {
-            if (!isValid) {
-                oauth2.errCb({
-                    authId: oauth2.auth.name,
-                    source: "auth",
-                    level: "warning",
-                    message: "Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"
-                });
-            }
-
-            if (qp.code) {
-                delete oauth2.state;
-                oauth2.auth.code = qp.code;
-                oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
-            } else {
-                let oauthErrorMsg;
-                if (qp.error) {
-                    oauthErrorMsg = "["+qp.error+"]: " +
-                        (qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
-                        (qp.error_uri ? "More info: "+qp.error_uri : "");
-                }
-
-                oauth2.errCb({
-                    authId: oauth2.auth.name,
-                    source: "auth",
-                    level: "error",
-                    message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server"
-                });
-            }
-        } else {
-            oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
-        }
-        window.close();
-    }
-
-    if (document.readyState !== 'loading') {
-        run();
-    } else {
-        document.addEventListener('DOMContentLoaded', function () {
-            run();
-        });
-    }
-</script>
-</body>
-</html>

File diff suppressed because it is too large
+ 0 - 1
swagger/swagger-ui-bundle.js


File diff suppressed because it is too large
+ 0 - 0
swagger/swagger-ui-bundle.js.map


File diff suppressed because it is too large
+ 0 - 0
swagger/swagger-ui-es-bundle-core.js


File diff suppressed because it is too large
+ 0 - 1
swagger/swagger-ui-es-bundle.js


File diff suppressed because it is too large
+ 0 - 1
swagger/swagger-ui-standalone-preset.js


File diff suppressed because it is too large
+ 0 - 0
swagger/swagger-ui-standalone-preset.js.map


File diff suppressed because it is too large
+ 0 - 1
swagger/swagger-ui.css


File diff suppressed because it is too large
+ 0 - 0
swagger/swagger-ui.css.map


File diff suppressed because it is too large
+ 0 - 0
swagger/swagger-ui.js


File diff suppressed because it is too large
+ 0 - 0
swagger/swagger-ui.js.map


+ 0 - 151
swagger/swagger.json

@@ -1,151 +0,0 @@
-{
-    "swagger": "2.0",
-    "info": {
-        "contact": {}
-    },
-    "basePath": "/htapi",
-    "paths": {
-        "/auth/login": {
-            "post": {
-                "tags": [
-                    "auth"
-                ],
-                "summary": "小程序用户登录",
-                "description": "用户通过微信小程序登录\n\u003cbr\u003e",
-                "parameters": [
-                    {
-                        "in": "body",
-                        "name": "mobile",
-                        "description": "登录请求体",
-                        "required": true,
-                        "schema": {
-                            "$ref": "#/definitions/LoginReq"
-                        }
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "",
-                        "schema": {
-                            "$ref": "#/definitions/controllers.BaseResponse"
-                        }
-                    }
-                }
-            }
-        },
-        "/auth/sendCode": {
-            "post": {
-                "tags": [
-                    "auth"
-                ],
-                "summary": "获取手机验证码",
-                "description": "用户发送手机验证码\n\u003cbr\u003e",
-                "parameters": [
-                    {
-                        "in": "body",
-                        "name": "mobile",
-                        "description": "小程序手机验证码接口",
-                        "required": true,
-                        "schema": {
-                            "$ref": "#/definitions/SmsCodeReq"
-                        }
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "",
-                        "schema": {
-                            "$ref": "#/definitions/controllers.BaseResponse"
-                        }
-                    }
-                }
-            }
-        },
-        "/report/list": {
-            "get": {
-                "tags": [
-                    "report"
-                ],
-                "description": "get all Users\n\u003cbr\u003e",
-                "operationId": "ReportController.GetAll",
-                "responses": {
-                    "200": {
-                        "description": "",
-                        "schema": {
-                            "$ref": "#/definitions/models.User"
-                        }
-                    }
-                }
-            }
-        },
-        "/user/": {
-            "get": {
-                "tags": [
-                    "user"
-                ],
-                "description": "get all Users\n\u003cbr\u003e",
-                "operationId": "UserController.GetAll",
-                "responses": {
-                    "200": {
-                        "description": "",
-                        "schema": {
-                            "$ref": "#/definitions/models.User"
-                        }
-                    }
-                }
-            }
-        }
-    },
-    "definitions": {
-        "LoginReq": {
-            "title": "LoginReq",
-            "type": "object"
-        },
-        "SmsCodeReq": {
-            "title": "SmsCodeReq",
-            "type": "object"
-        },
-        "controllers.BaseResponse": {
-            "title": "BaseResponse",
-            "type": "object",
-            "properties": {
-                "Data": {
-                    "$ref": "#/definitions/controllers.interface"
-                },
-                "ErrCode": {
-                    "type": "integer",
-                    "format": "int64"
-                },
-                "ErrMsg": {
-                    "type": "string"
-                },
-                "Msg": {
-                    "type": "string"
-                },
-                "Ret": {
-                    "description": "返回状态码",
-                    "type": "integer",
-                    "format": "int64"
-                },
-                "Success": {
-                    "description": "true 执行成功,false 执行失败",
-                    "type": "boolean"
-                }
-            }
-        },
-        "controllers.interface": {
-            "title": "interface",
-            "type": "object"
-        },
-        "models.User": {
-            "title": "User",
-            "type": "object"
-        }
-    },
-    "tags": [
-        {
-            "name": "user",
-            "description": "Operations about Users\n"
-        }
-    ]
-}

+ 0 - 107
swagger/swagger.yml

@@ -1,107 +0,0 @@
-swagger: "2.0"
-info: {}
-basePath: /htapi
-paths:
-  /auth/login:
-    post:
-      tags:
-      - auth
-      summary: 小程序用户登录
-      description: |-
-        用户通过微信小程序登录
-        <br>
-      parameters:
-      - in: body
-        name: mobile
-        description: 登录请求体
-        required: true
-        schema:
-          $ref: '#/definitions/LoginReq'
-      responses:
-        "200":
-          description: ""
-          schema:
-            $ref: '#/definitions/controllers.BaseResponse'
-  /auth/sendCode:
-    post:
-      tags:
-      - auth
-      summary: 获取手机验证码
-      description: |-
-        用户发送手机验证码
-        <br>
-      parameters:
-      - in: body
-        name: mobile
-        description: 小程序手机验证码接口
-        required: true
-        schema:
-          $ref: '#/definitions/SmsCodeReq'
-      responses:
-        "200":
-          description: ""
-          schema:
-            $ref: '#/definitions/controllers.BaseResponse'
-  /report/list:
-    get:
-      tags:
-      - report
-      description: |-
-        get all Users
-        <br>
-      operationId: ReportController.GetAll
-      responses:
-        "200":
-          description: ""
-          schema:
-            $ref: '#/definitions/models.User'
-  /user/:
-    get:
-      tags:
-      - user
-      description: |-
-        get all Users
-        <br>
-      operationId: UserController.GetAll
-      responses:
-        "200":
-          description: ""
-          schema:
-            $ref: '#/definitions/models.User'
-definitions:
-  LoginReq:
-    title: LoginReq
-    type: object
-  SmsCodeReq:
-    title: SmsCodeReq
-    type: object
-  controllers.BaseResponse:
-    title: BaseResponse
-    type: object
-    properties:
-      Data:
-        $ref: '#/definitions/controllers.interface'
-      ErrCode:
-        type: integer
-        format: int64
-      ErrMsg:
-        type: string
-      Msg:
-        type: string
-      Ret:
-        description: 返回状态码
-        type: integer
-        format: int64
-      Success:
-        description: true 执行成功,false 执行失败
-        type: boolean
-  controllers.interface:
-    title: interface
-    type: object
-  models.User:
-    title: User
-    type: object
-tags:
-- name: user
-  description: |
-    Operations about Users

Some files were not shown because too many files changed in this diff