UserController.php 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <?php
  2. namespace PetstoreIO;
  3. class UserController
  4. {
  5. /**
  6. * @OA\Post(path="/user",
  7. * tags={"user"},
  8. * summary="Create user",
  9. * description="This can only be done by the logged in user.",
  10. * operationId="createUser",
  11. * @OA\RequestBody(
  12. * required=true,
  13. * description="Created user object",
  14. * @OA\MediaType(
  15. * mediaType="multipart/form-data",
  16. * @OA\Schema(ref="#/components/schemas/User")
  17. * )
  18. * ),
  19. * @OA\Response(response="default", description="successful operation")
  20. * )
  21. */
  22. public function createUser()
  23. {
  24. }
  25. /**
  26. * @OA\Post(path="/user/createWithArray",
  27. * tags={"user"},
  28. * summary="Creates list of users with given input array",
  29. * description="",
  30. * operationId="createUsersWithArrayInput",
  31. * @OA\RequestBody(
  32. * description="List of user object",
  33. * required=true,
  34. * @OA\MediaType(
  35. * mediaType="multipart/form-data",
  36. * @OA\Schema(
  37. * type="array",
  38. * @OA\Items(ref="#/components/schemas/User")
  39. * )
  40. * )
  41. * ),
  42. * @OA\Response(response="default", description="successful operation")
  43. * )
  44. */
  45. public function createUsersWithArrayInput()
  46. {
  47. }
  48. /**
  49. * @OA\Post(path="/user/createWithList",
  50. * tags={"user"},
  51. * summary="Creates list of users with given input array",
  52. * description="",
  53. * operationId="createUsersWithListInput",
  54. * @OA\RequestBody(
  55. * required=true,
  56. * description="List of user object",
  57. * @OA\MediaType(
  58. * mediaType="multipart/form-data",
  59. * @OA\Schema(
  60. * type="array",
  61. * @OA\Items(ref="#/components/schemas/User")
  62. * )
  63. * )
  64. * ),
  65. * @OA\Response(response="default", description="successful operation")
  66. * )
  67. */
  68. public function createUsersWithListInput()
  69. {
  70. }
  71. /**
  72. * @OA\Get(path="/user/login",
  73. * tags={"user"},
  74. * summary="Logs user into the system",
  75. * description="",
  76. * operationId="loginUser",
  77. * @OA\Parameter(
  78. * name="username",
  79. * required=true,
  80. * in="query",
  81. * description="The user name for login",
  82. * @OA\Schema(
  83. * type="string"
  84. * )
  85. * ),
  86. * @OA\Parameter(
  87. * name="password",
  88. * in="query",
  89. * @OA\Schema(
  90. * type="string",
  91. * ),
  92. * description="The password for login in clear text",
  93. * ),
  94. * @OA\Response(
  95. * response=200,
  96. * description="successful operation",
  97. * @OA\Schema(type="string"),
  98. * @OA\Header(
  99. * header="X-Rate-Limit",
  100. * @OA\Schema(
  101. * type="integer",
  102. * format="int32"
  103. * ),
  104. * description="calls per hour allowed by the user"
  105. * ),
  106. * @OA\Header(
  107. * header="X-Expires-After",
  108. * @OA\Schema(
  109. * type="string",
  110. * format="date-time",
  111. * ),
  112. * description="date in UTC when token expires"
  113. * )
  114. * ),
  115. * @OA\Response(response=400, description="Invalid username/password supplied")
  116. * )
  117. */
  118. public function loginUser()
  119. {
  120. }
  121. /**
  122. * @OA\Get(path="/user/logout",
  123. * tags={"user"},
  124. * summary="Logs out current logged in user session",
  125. * description="",
  126. * operationId="logoutUser",
  127. * parameters={},
  128. * @OA\Response(response="default", description="successful operation")
  129. * )
  130. */
  131. public function logoutUser()
  132. {
  133. }
  134. /**
  135. * @OA\Get(path="/user/{username}",
  136. * tags={"user"},
  137. * summary="Get user by user name",
  138. * description="",
  139. * operationId="getUserByName",
  140. * @OA\Parameter(
  141. * name="username",
  142. * in="path",
  143. * description="The name that needs to be fetched. Use user1 for testing. ",
  144. * required=true,
  145. * @OA\Schema(
  146. * type="string"
  147. * )
  148. * ),
  149. * @OA\Response(response=200, description="successful operation", @OA\Schema(ref="#/components/schemas/User")),
  150. * @OA\Response(response=400, description="Invalid username supplied"),
  151. * @OA\Response(response=404, description="User not found")
  152. * )
  153. */
  154. public function getUserByName($username)
  155. {
  156. }
  157. /**
  158. * @OA\Put(path="/user/{username}",
  159. * tags={"user"},
  160. * summary="Updated user",
  161. * description="This can only be done by the logged in user.",
  162. * operationId="updateUser",
  163. * @OA\Parameter(
  164. * name="username",
  165. * in="path",
  166. * description="name that need to be updated",
  167. * required=true,
  168. * @OA\Schema(
  169. * type="string"
  170. * )
  171. * ),
  172. * @OA\Response(response=400, description="Invalid user supplied"),
  173. * @OA\Response(response=404, description="User not found"),
  174. * @OA\RequestBody(
  175. * required=true,
  176. * description="Updated user object",
  177. * @OA\MediaType(
  178. * mediaType="multipart/form-data",
  179. * @OA\Schema(ref="#/components/schemas/User")
  180. * )
  181. * ),
  182. * )
  183. */
  184. public function updateUser()
  185. {
  186. }
  187. /**
  188. * @OA\Delete(path="/user/{username}",
  189. * tags={"user"},
  190. * summary="Delete user",
  191. * description="This can only be done by the logged in user.",
  192. * operationId="deleteUser",
  193. * @OA\Parameter(
  194. * name="username",
  195. * in="path",
  196. * description="The name that needs to be deleted",
  197. * required=true,
  198. * @OA\Schema(
  199. * type="string"
  200. * )
  201. * ),
  202. * @OA\Response(response=400, description="Invalid username supplied"),
  203. * @OA\Response(response=404, description="User not found")
  204. * )
  205. */
  206. public function deleteUser()
  207. {
  208. }
  209. }