Advertisement
Guest User

Untitled

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