basePath: /api/v1 info: contact: email: kptzhu@163.com name: zhuhongbin url: https://github.com/kptyun description: kptyun_service title: kptyun_service version: 1.1.2 paths: /api/v1/menus: get: consumes: - application/json produces: - application/json responses: "200": description: '{ "code": 200, "data": {}, "msg": "ok" }' schema: type: string summary: 获取所有菜单 tags: - menu post: consumes: - application/json parameters: - description: name in: query name: name required: true type: string - description: path in: query name: path required: true type: string produces: - application/json responses: "200": description: '{ "code": 200, "data": {}, "msg": "ok" }' schema: type: string summary: 增加菜单 tags: - menu /api/v1/menus/: delete: consumes: - application/json parameters: - description: id in: path name: id required: true type: string produces: - application/json responses: "200": description: '{ "code": 200, "data": {}, "msg": "ok" }' schema: type: string summary: 删除菜单 tags: - menu get: consumes: - application/json parameters: - description: id in: path name: id required: true type: string produces: - application/json responses: "200": description: '{ "code": 200, "data": {}, "msg": "ok" }' schema: type: string summary: 获取单个菜单 tags: - menu put: consumes: - application/json parameters: - description: id in: path name: id required: true type: string - description: name in: query name: name required: true type: string - description: path in: query name: path required: true type: string - description: method in: query name: method required: true type: string produces: - application/json responses: "200": description: '{ "code": 200, "data": {}, "msg": "ok" }' schema: type: string summary: 更新菜单 tags: - menu /api/v1/roles: get: consumes: - application/json produces: - application/json responses: "200": description: '{ "code": 200, "data": {}, "msg": "ok" }' schema: type: string summary: 获取所有角色 tags: - role post: consumes: - application/json parameters: - description: name in: query name: name required: true type: string - description: menu_id in: query name: menu_id required: true type: string produces: - application/json responses: "200": description: '{ "code": 200, "data": {}, "msg": "ok" }' schema: type: string summary: 增加角色 tags: - role /api/v1/roles/: delete: consumes: - application/json parameters: - description: id in: path name: id required: true type: string produces: - application/json responses: "200": description: '{ "code": 200, "data": {}, "msg": "ok" }' schema: type: string summary: 删除角色 tags: - role get: consumes: - application/json parameters: - description: id in: path name: id required: true type: string produces: - application/json responses: "200": description: '{ "code": 200, "data": {}, "msg": "ok" }' schema: type: string summary: 获取单个角色 tags: - role put: consumes: - application/json parameters: - description: id in: path name: id required: true type: string - description: name in: query name: name required: true type: string - description: menu_id in: query name: menu_id required: true type: string produces: - application/json responses: "200": description: '{ "code": 200, "data": {}, "msg": "ok" }' schema: type: string summary: 更新角色 tags: - role /api/v1/users: get: consumes: - application/json parameters: - {} produces: - application/json responses: "200": description: '{ "code": 200, "data": {}, "msg": "ok" }' schema: type: string summary: 获取所有用户 tags: - users post: consumes: - application/json parameters: - description: username in: body name: username required: true schema: type: object - description: password in: body name: password required: true schema: type: object - description: role_id in: path name: role_id type: integer produces: - application/json responses: "200": description: '{ "code": 200, "data": {}, "msg": "ok" }' schema: type: string summary: 增加用户 tags: - users /api/v1/users/: delete: consumes: - application/json parameters: - description: id in: path name: id required: true type: integer produces: - application/json responses: "200": description: '{ "code": 200, "data": {}, "msg": "ok" }' schema: type: string summary: 删除用户 tags: - users get: consumes: - application/json parameters: - description: id in: path name: id required: true type: integer produces: - application/json responses: "200": description: '{ "code": 200, "data": {}, "msg": "ok" }' schema: type: string summary: 获取单个用户信息 tags: - users put: consumes: - application/json parameters: - {} - {} - description: role_id in: query name: role_id type: integer produces: - application/json responses: "200": description: '{ "code": 200, "data": {}, "msg": "ok" }' schema: type: string summary: 更新用户 tags: - users /auth: post: consumes: - application/json parameters: - description: username in: path name: username required: true type: string - description: password in: path name: password required: true type: string produces: - application/json responses: "200": description: '{ "code": 200, "data": { "token": "xxx" }, "msg": "ok" }' schema: type: string "400": description: '{"code":400, "data":null,"msg":"请求参数错误"}' schema: type: string "404": description: '{ "code": 404, "data":null,"msg":"请求参数错误"}' schema: type: string summary: 获取登录token 信息 tags: - auth swagger: "2.0"