Browse Source

swagger 说明

zhangnaiwen 2 năm trước cách đây
mục cha
commit
056f492b46
2 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 2 2
      src/app/api/data.py
  2. 1 1
      src/app/api/role.py

+ 2 - 2
src/app/api/data.py

@@ -560,7 +560,7 @@ class BuildingApi(Resource):
 
 
 underlying_system = reqparse.RequestParser(bundle_errors=True)
-underlying_system.add_argument(name='picture', type=FileStorage, location='files', required=False, help='楼宇图片')
+underlying_system.add_argument(name='picture', type=FileStorage, location='files', required=False, help='底层信息系统图片')
 
 
 @ns.route('/underlying_system')
@@ -570,7 +570,7 @@ class UnderlyingSystemMessageApi(Resource):
     @ns.doc(id='underlying_system_list', description='获取底层系统')
     @ns.expect()
     def get(self):
-        """获取底层系统"""
+        """获取底层信息系统"""
 
         try:
             with Session(current_app.engine) as session:

+ 1 - 1
src/app/api/role.py

@@ -290,7 +290,7 @@ batch_delete_role.add_argument(name='role_ids', type=int, location='form', requi
 class BatchDeleteRole(Resource):
 
     @ns.doc(description='批量删除角色')
-    @ns.expect()
+    @ns.expect(batch_delete_role)
     def delete(self):
         """批量删除角色"""
         role_ids = request.form.get('role_ids')