addDept.openapi.json 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "系统管理",
  5. "description": "系统管理—相关接口文档",
  6. "version": "1.0-SNAPSHOT"
  7. },
  8. "paths": {
  9. "/dept": {
  10. "post": {
  11. "tags": ["部门管理API"],
  12. "summary": "新增部门",
  13. "operationId": "addDept",
  14. "requestBody": {
  15. "content": {
  16. "application/json": {
  17. "schema": {
  18. "$ref": "#/components/schemas/DeptInfo"
  19. }
  20. }
  21. },
  22. "required": true
  23. },
  24. "responses": {
  25. "200": {
  26. "description": "OK",
  27. "content": {
  28. "*/*": {
  29. "schema": {
  30. "$ref": "#/components/schemas/AjaxResultLong"
  31. }
  32. }
  33. }
  34. }
  35. }
  36. }
  37. }
  38. },
  39. "components": {
  40. "schemas": {
  41. "DeptInfo": {
  42. "type": "object",
  43. "properties": {
  44. "deptId": {
  45. "type": "integer",
  46. "format": "int64",
  47. "description": "部门ID"
  48. },
  49. "parentId": {
  50. "type": "integer",
  51. "format": "int64",
  52. "description": "父部门ID"
  53. },
  54. "ancestors": {
  55. "type": "string",
  56. "description": "祖级列表"
  57. },
  58. "deptName": {
  59. "type": "string",
  60. "description": "部门名称",
  61. "maxLength": 30,
  62. "minLength": 0
  63. },
  64. "deptFullPathName": {
  65. "type": "string",
  66. "description": "部门名称(包含祖部门)"
  67. },
  68. "orderNum": {
  69. "type": "integer",
  70. "format": "int32",
  71. "description": "显示顺序"
  72. },
  73. "leader": {
  74. "type": "string",
  75. "description": "负责人"
  76. },
  77. "phone": {
  78. "type": "string",
  79. "description": "联系电话",
  80. "maxLength": 11,
  81. "minLength": 0
  82. },
  83. "email": {
  84. "type": "string",
  85. "format": "email",
  86. "description": "邮箱",
  87. "maxLength": 50,
  88. "minLength": 0
  89. },
  90. "status": {
  91. "type": "string",
  92. "description": "状态标志(详见字典:系统开关)",
  93. "minLength": 1,
  94. "pattern": "^[01]$"
  95. },
  96. "delFlag": {
  97. "type": "string",
  98. "description": "删除标志(详见字典:删除标志)"
  99. },
  100. "createIdBy": {
  101. "type": "integer",
  102. "format": "int64",
  103. "description": "创建者ID"
  104. },
  105. "createBy": {
  106. "type": "string",
  107. "description": "创建者"
  108. },
  109. "createTime": {
  110. "type": "string",
  111. "format": "date-time",
  112. "description": "创建时间"
  113. },
  114. "updateIdBy": {
  115. "type": "integer",
  116. "format": "int64",
  117. "description": "更新者ID"
  118. },
  119. "updateBy": {
  120. "type": "string",
  121. "description": "更新者"
  122. },
  123. "updateTime": {
  124. "type": "string",
  125. "format": "date-time",
  126. "description": "更新时间"
  127. },
  128. "remark": {
  129. "type": "string",
  130. "description": "备注"
  131. },
  132. "parentName": {
  133. "type": "string",
  134. "description": "父部门名称"
  135. },
  136. "children": {
  137. "type": "array",
  138. "description": "子部门",
  139. "items": {
  140. "$ref": "#/components/schemas/DeptInfo"
  141. }
  142. }
  143. },
  144. "required": ["deptName", "orderNum", "parentId", "status"]
  145. },
  146. "AjaxResultLong": {
  147. "type": "object",
  148. "description": "接口返回对象",
  149. "properties": {
  150. "code": {
  151. "type": "integer",
  152. "format": "int32",
  153. "description": "状态码"
  154. },
  155. "msg": {
  156. "type": "string",
  157. "description": "提示语"
  158. },
  159. "data": {
  160. "type": "integer",
  161. "format": "int64",
  162. "description": "数据对象"
  163. }
  164. }
  165. }
  166. }
  167. }
  168. }