addRole.openapi.json 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "系统管理",
  5. "description": "系统管理—相关接口文档",
  6. "version": "1.0-SNAPSHOT"
  7. },
  8. "paths": {
  9. "/role": {
  10. "post": {
  11. "tags": ["角色管理API"],
  12. "summary": "新增角色",
  13. "operationId": "add_1",
  14. "requestBody": {
  15. "content": {
  16. "application/json": {
  17. "schema": {
  18. "$ref": "#/components/schemas/SysRole"
  19. }
  20. }
  21. },
  22. "required": true
  23. },
  24. "responses": {
  25. "200": {
  26. "description": "OK",
  27. "content": {
  28. "*/*": {
  29. "schema": {
  30. "$ref": "#/components/schemas/AjaxResult"
  31. }
  32. }
  33. }
  34. }
  35. }
  36. }
  37. }
  38. },
  39. "components": {
  40. "schemas": {
  41. "SysRole": {
  42. "type": "object",
  43. "description": "角色对象",
  44. "properties": {
  45. "createIdBy": {
  46. "type": "integer",
  47. "format": "int64"
  48. },
  49. "createBy": {
  50. "type": "string"
  51. },
  52. "createTime": {
  53. "type": "string",
  54. "format": "date-time"
  55. },
  56. "updateIdBy": {
  57. "type": "integer",
  58. "format": "int64"
  59. },
  60. "updateBy": {
  61. "type": "string"
  62. },
  63. "updateTime": {
  64. "type": "string",
  65. "format": "date-time"
  66. },
  67. "remark": {
  68. "type": "string"
  69. },
  70. "params": {
  71. "type": "object",
  72. "additionalProperties": {}
  73. },
  74. "roleId": {
  75. "type": "integer",
  76. "format": "int64",
  77. "description": "角色ID"
  78. },
  79. "roleName": {
  80. "type": "string",
  81. "description": "角色名称",
  82. "maxLength": 30,
  83. "minLength": 0
  84. },
  85. "roleKey": {
  86. "type": "string",
  87. "description": "角色权限",
  88. "maxLength": 100,
  89. "minLength": 0
  90. },
  91. "roleSort": {
  92. "type": "integer",
  93. "format": "int32",
  94. "description": "角色排序"
  95. },
  96. "dataScope": {
  97. "type": "string",
  98. "description": "数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限)"
  99. },
  100. "menuCheckStrictly": {
  101. "type": "boolean",
  102. "description": "菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示)"
  103. },
  104. "deptCheckStrictly": {
  105. "type": "boolean",
  106. "description": "部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 )"
  107. },
  108. "status": {
  109. "type": "string",
  110. "description": "角色状态(0正常 1停用)"
  111. },
  112. "delFlag": {
  113. "type": "string",
  114. "description": "删除标志(0代表存在 2代表删除)"
  115. },
  116. "flag": {
  117. "type": "boolean",
  118. "description": "用户是否存在此角色标识 默认不存在"
  119. },
  120. "menuIds": {
  121. "type": "array",
  122. "description": "菜单组",
  123. "items": {
  124. "type": "integer",
  125. "format": "int64"
  126. }
  127. },
  128. "deptIds": {
  129. "type": "array",
  130. "description": "部门组(数据权限)",
  131. "items": {
  132. "type": "integer",
  133. "format": "int64"
  134. }
  135. },
  136. "permissions": {
  137. "type": "array",
  138. "description": "角色菜单权限",
  139. "items": {
  140. "type": "string"
  141. },
  142. "uniqueItems": true
  143. }
  144. },
  145. "required": ["roleName"]
  146. },
  147. "AjaxResult": {
  148. "type": "object",
  149. "description": "接口返回对象",
  150. "properties": {
  151. "code": {
  152. "type": "integer",
  153. "format": "int32",
  154. "description": "状态码"
  155. },
  156. "msg": {
  157. "type": "string",
  158. "description": "提示语"
  159. },
  160. "data": {
  161. "description": "数据对象"
  162. }
  163. }
  164. }
  165. }
  166. }
  167. }