Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class UserController
- {
- /**
- * @SWG\Post(path="/user",
- * tags={"user"},
- * summary="Create user",
- * description="This can only be done by the logged in user.",
- * operationId="createUser",
- * produces={"application/xml", "application/json"},
- * @SWG\Parameter(
- * in="body",
- * name="body",
- * description="Created user object",
- * required=true,
- * @SWG\Schema(ref="#/definitions/User")
- * ),
- * @SWG\Response(response="default", description="successful operation")
- * )
- */
- public function createUser()
- {
- }
- /**
- * @SWG\Post(path="/user/createWithArray",
- * tags={"user"},
- * summary="Creates list of users with given input array",
- * description="",
- * operationId="createUsersWithArrayInput",
- * produces={"application/xml", "application/json"},
- * @SWG\Parameter(
- * in="body",
- * name="body",
- * description="List of user object",
- * required=true,
- * @SWG\Schema(
- * type="array",
- * @SWG\Items(ref="#/definitions/User")
- * )
- * ),
- * @SWG\Response(response="default", description="successful operation")
- * )
- */
- public function createUsersWithArrayInput()
- {
- }
- /**
- * @SWG\Post(path="/user/createWithList",
- * tags={"user"},
- * summary="Creates list of users with given input array",
- * description="",
- * operationId="createUsersWithListInput",
- * produces={"application/xml", "application/json"},
- * @SWG\Parameter(
- * in="body",
- * name="body",
- * description="List of user object",
- * required=true,
- * @SWG\Schema(
- * type="array",
- * @SWG\Items(ref="#/definitions/User")
- * )
- * ),
- * @SWG\Response(response="default", description="successful operation")
- * )
- */
- /**
- * @SWG\Get(path="/user/login",
- * tags={"user"},
- * summary="Logs user into the system",
- * description="",
- * operationId="loginUser",
- * produces={"application/xml", "application/json"},
- * @SWG\Parameter(
- * name="username",
- * in="query",
- * description="The user name for login",
- * required=true,
- * type="string"
- * ),
- * @SWG\Parameter(
- * name="password",
- * in="query",
- * description="The password for login in clear text",
- * required=true,
- * type="string"
- * ),
- * @SWG\Response(
- * response=200,
- * description="successful operation",
- * @SWG\Schema(type="string"),
- * @SWG\Header(
- * header="X-Rate-Limit",
- * type="integer",
- * format="int32",
- * description="calls per hour allowed by the user"
- * ),
- * @SWG\Header(
- * header="X-Expires-After",
- * type="string",
- * format="date-time",
- * description="date in UTC when token expires"
- * )
- * ),
- * @SWG\Response(response=400, description="Invalid username/password supplied")
- * )
- */
- public function loginUser()
- {
- }
- /**
- * @SWG\Get(path="/user/logout",
- * tags={"user"},
- * summary="Logs out current logged in user session",
- * description="",
- * operationId="logoutUser",
- * produces={"application/xml", "application/json"},
- * parameters={},
- * @SWG\Response(response="default", description="successful operation")
- * )
- */
- public function logoutUser()
- {
- }
- /**
- * @SWG\Get(path="/user/{username}",
- * tags={"user"},
- * summary="Get user by user name",
- * description="",
- * operationId="getUserByName",
- * produces={"application/xml", "application/json"},
- * @SWG\Parameter(
- * name="username",
- * in="path",
- * description="The name that needs to be fetched. Use user1 for testing. ",
- * required=true,
- * type="string"
- * ),
- * @SWG\Response(response=200, description="successful operation", @SWG\Schema(ref="#/definitions/User")),
- * @SWG\Response(response=400, description="Invalid username supplied"),
- * @SWG\Response(response=404, description="User not found")
- * )
- */
- public function getUserByName($username)
- {
- }
- /**
- * @SWG\Put(path="/user/{username}",
- * tags={"user"},
- * summary="Updated user",
- * description="This can only be done by the logged in user.",
- * operationId="updateUser",
- * produces={"application/xml", "application/json"},
- * @SWG\Parameter(
- * name="username",
- * in="path",
- * description="name that need to be updated",
- * required=true,
- * type="string"
- * ),
- * @SWG\Parameter(
- * in="body",
- * name="body",
- * description="Updated user object",
- * required=true,
- * @SWG\Schema(ref="#/definitions/User")
- * ),
- * @SWG\Response(response=400, description="Invalid user supplied"),
- * @SWG\Response(response=404, description="User not found")
- * )
- */
- public function updateUser()
- {
- }
- /**
- * @SWG\Delete(path="/user/{username}",
- * tags={"user"},
- * summary="Delete user",
- * description="This can only be done by the logged in user.",
- * operationId="deleteUser",
- * produces={"application/xml", "application/json"},
- * @SWG\Parameter(
- * name="username",
- * in="path",
- * description="The name that needs to be deleted",
- * required=true,
- * type="string"
- * ),
- * @SWG\Response(response=400, description="Invalid username supplied"),
- * @SWG\Response(response=404, description="User not found")
- * )
- */
- public function deleteUser()
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement