addMenu.openapi.json 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "系统管理",
  5. "description": "系统管理—相关接口文档",
  6. "version": "1.0-SNAPSHOT"
  7. },
  8. "paths": {
  9. "/menu": {
  10. "post": {
  11. "tags": ["菜单管理API"],
  12. "summary": "新增菜单",
  13. "operationId": "add_2",
  14. "requestBody": {
  15. "content": {
  16. "application/json": {
  17. "schema": {
  18. "$ref": "#/components/schemas/SysMenu"
  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. "SysMenu": {
  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. "menuId": {
  75. "type": "integer",
  76. "format": "int64",
  77. "description": "菜单ID"
  78. },
  79. "menuName": {
  80. "type": "string",
  81. "description": "菜单名称",
  82. "maxLength": 50,
  83. "minLength": 0
  84. },
  85. "parentName": {
  86. "type": "string",
  87. "description": "父菜单名称"
  88. },
  89. "parentId": {
  90. "type": "integer",
  91. "format": "int64",
  92. "description": "父菜单ID"
  93. },
  94. "orderNum": {
  95. "type": "integer",
  96. "format": "int32",
  97. "description": "显示顺序"
  98. },
  99. "path": {
  100. "type": "string",
  101. "description": "路由地址",
  102. "maxLength": 200,
  103. "minLength": 0
  104. },
  105. "component": {
  106. "type": "string",
  107. "description": "组件路径",
  108. "maxLength": 200,
  109. "minLength": 0
  110. },
  111. "query": {
  112. "type": "string",
  113. "description": "路由参数"
  114. },
  115. "routeName": {
  116. "type": "string",
  117. "description": "路由名称,默认和路由地址相同的驼峰格式"
  118. },
  119. "isFrame": {
  120. "type": "string",
  121. "description": "是否为外链(0是 1否)"
  122. },
  123. "isCache": {
  124. "type": "string",
  125. "description": "是否缓存(0缓存 1不缓存)"
  126. },
  127. "menuType": {
  128. "type": "string",
  129. "description": "类型(M目录 C菜单 F按钮)",
  130. "minLength": 1
  131. },
  132. "visible": {
  133. "type": "string",
  134. "description": "显示状态(0显示 1隐藏)"
  135. },
  136. "status": {
  137. "type": "string",
  138. "description": "菜单状态(0正常 1停用)"
  139. },
  140. "perms": {
  141. "type": "string",
  142. "description": "权限字符串",
  143. "maxLength": 100,
  144. "minLength": 0
  145. },
  146. "icon": {
  147. "type": "string",
  148. "description": "菜单图标"
  149. },
  150. "children": {
  151. "type": "array",
  152. "description": "子菜单",
  153. "items": {
  154. "$ref": "#/components/schemas/SysMenu"
  155. }
  156. }
  157. },
  158. "required": ["menuName", "menuType", "orderNum"]
  159. },
  160. "AjaxResult": {
  161. "type": "object",
  162. "description": "接口返回对象",
  163. "properties": {
  164. "code": {
  165. "type": "integer",
  166. "format": "int32",
  167. "description": "状态码"
  168. },
  169. "msg": {
  170. "type": "string",
  171. "description": "提示语"
  172. },
  173. "data": {
  174. "description": "数据对象"
  175. }
  176. }
  177. }
  178. }
  179. }
  180. }