users.yaml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. CurrentUser:
  2. get:
  3. operationId: getCurrentUser
  4. summary: 查询当前用户
  5. parameters:
  6. - $ref: '../components/parameters.yaml#/XRequestId'
  7. responses:
  8. '200':
  9. description: 当前用户摘要
  10. content:
  11. application/json:
  12. schema:
  13. $ref: '../components/schemas.yaml#/UserResponse'
  14. '400':
  15. $ref: '../components/responses.yaml#/InvalidArgument'
  16. '401':
  17. $ref: '../components/responses.yaml#/AuthenticationError'
  18. '403':
  19. $ref: '../components/responses.yaml#/Forbidden'
  20. '500':
  21. $ref: '../components/responses.yaml#/InternalError'
  22. Users:
  23. get:
  24. operationId: listUsers
  25. summary: 分页查询人员
  26. parameters:
  27. - $ref: '../components/parameters.yaml#/XRequestId'
  28. - name: organizationId
  29. in: query
  30. schema:
  31. $ref: '../components/schemas.yaml#/StringId'
  32. - name: includeDescendants
  33. in: query
  34. schema:
  35. type: boolean
  36. default: false
  37. - name: keyword
  38. in: query
  39. schema:
  40. type: string
  41. - name: status
  42. in: query
  43. schema:
  44. $ref: '../components/schemas.yaml#/EnabledStatus'
  45. - name: page
  46. in: query
  47. schema:
  48. type: integer
  49. minimum: 1
  50. default: 1
  51. - name: pageSize
  52. in: query
  53. schema:
  54. type: integer
  55. minimum: 1
  56. maximum: 100
  57. default: 20
  58. responses:
  59. '200':
  60. description: 人员分页结果
  61. content:
  62. application/json:
  63. schema:
  64. $ref: '../components/schemas.yaml#/UserPageResponse'
  65. '400':
  66. $ref: '../components/responses.yaml#/InvalidArgument'
  67. '401':
  68. $ref: '../components/responses.yaml#/AuthenticationError'
  69. '403':
  70. $ref: '../components/responses.yaml#/Forbidden'
  71. '500':
  72. $ref: '../components/responses.yaml#/InternalError'
  73. post:
  74. operationId: createUser
  75. summary: 创建用户
  76. parameters:
  77. - $ref: '../components/parameters.yaml#/XRequestId'
  78. requestBody:
  79. required: true
  80. content:
  81. application/json:
  82. schema:
  83. $ref: '../components/schemas.yaml#/CreateUserRequest'
  84. responses:
  85. '201':
  86. description: 创建成功
  87. content:
  88. application/json:
  89. schema:
  90. $ref: '../components/schemas.yaml#/UserResponse'
  91. '400':
  92. $ref: '../components/responses.yaml#/InvalidArgument'
  93. '401':
  94. $ref: '../components/responses.yaml#/AuthenticationError'
  95. '403':
  96. $ref: '../components/responses.yaml#/Forbidden'
  97. '409':
  98. $ref: '../components/responses.yaml#/Conflict'
  99. '500':
  100. $ref: '../components/responses.yaml#/InternalError'
  101. User:
  102. parameters:
  103. - name: id
  104. in: path
  105. required: true
  106. schema:
  107. $ref: '../components/schemas.yaml#/StringId'
  108. put:
  109. operationId: updateUser
  110. summary: 编辑用户
  111. requestBody:
  112. required: true
  113. content:
  114. application/json:
  115. schema:
  116. $ref: '../components/schemas.yaml#/UpdateUserRequest'
  117. responses:
  118. '200':
  119. description: 编辑成功
  120. content:
  121. application/json:
  122. schema:
  123. $ref: '../components/schemas.yaml#/UserResponse'
  124. '400':
  125. $ref: '../components/responses.yaml#/InvalidArgument'
  126. '401':
  127. $ref: '../components/responses.yaml#/AuthenticationError'
  128. '403':
  129. $ref: '../components/responses.yaml#/Forbidden'
  130. '404':
  131. $ref: '../components/responses.yaml#/NotFound'
  132. '409':
  133. $ref: '../components/responses.yaml#/Conflict'
  134. '500':
  135. $ref: '../components/responses.yaml#/InternalError'
  136. delete:
  137. operationId: deleteUser
  138. summary: 逻辑删除用户
  139. parameters:
  140. - name: rowVersion
  141. in: query
  142. required: true
  143. schema: {type: integer, minimum: 0}
  144. responses:
  145. '200':
  146. description: 删除成功
  147. content:
  148. application/json:
  149. schema:
  150. $ref: '../components/schemas.yaml#/DeleteUserResponse'
  151. '400':
  152. $ref: '../components/responses.yaml#/InvalidArgument'
  153. '401':
  154. $ref: '../components/responses.yaml#/AuthenticationError'
  155. '403':
  156. $ref: '../components/responses.yaml#/Forbidden'
  157. '404':
  158. $ref: '../components/responses.yaml#/NotFound'
  159. '409':
  160. $ref: '../components/responses.yaml#/Conflict'
  161. '500':
  162. $ref: '../components/responses.yaml#/InternalError'
  163. UserResetPassword:
  164. parameters:
  165. - name: id
  166. in: path
  167. required: true
  168. schema:
  169. $ref: '../components/schemas.yaml#/StringId'
  170. post:
  171. operationId: resetUserPassword
  172. summary: 重置用户密码
  173. requestBody:
  174. required: true
  175. content:
  176. application/json:
  177. schema:
  178. $ref: '../components/schemas.yaml#/ResetUserPasswordRequest'
  179. responses:
  180. '200':
  181. description: 重置成功
  182. content:
  183. application/json:
  184. schema:
  185. $ref: '../components/schemas.yaml#/ResetPasswordResponse'
  186. '400':
  187. $ref: '../components/responses.yaml#/InvalidArgument'
  188. '401':
  189. $ref: '../components/responses.yaml#/AuthenticationError'
  190. '403':
  191. $ref: '../components/responses.yaml#/Forbidden'
  192. '404':
  193. $ref: '../components/responses.yaml#/NotFound'
  194. '409':
  195. $ref: '../components/responses.yaml#/Conflict'
  196. '500':
  197. $ref: '../components/responses.yaml#/InternalError'