Package org.eclipse.microprofile.openapi.apps.airlines.resources

## Class UserResource

- java.lang.Object
- - org.eclipse.microprofile.openapi.apps.airlines.resources.UserResource

    @Path("/user")
    @Produces({"application/json","application/xml"})
    public class UserResource
    extends Object

### Constructor Summary

Constructors
`UserResource()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `changePassword​(String username, String currentPassword, String newPassword)`
`jakarta.ws.rs.core.Response` `createUser​(User user)`
`jakarta.ws.rs.core.Response` `createUsersWithArrayInput​(User[] users)`
`jakarta.ws.rs.core.Response` `createUsersWithListInput​(List<User> users)`
`jakarta.ws.rs.core.Response` `deleteUser​(String userName)`
`jakarta.ws.rs.core.Response` `getUserById​(int id)`
`jakarta.ws.rs.core.Response` `getUserByName​(String userName)`
`UserData` `getUserData()`
`jakarta.ws.rs.core.Response` `loginUser​(String username, String password)`
`jakarta.ws.rs.core.Response` `logoutUser()`
`void` `setUserData​(UserData userData)`
`User` `specialOperation​(User body, String param1)` Operation to test hiding of request body and parameter schemas
`jakarta.ws.rs.core.Response` `updateUser​(String username, User user)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### UserResource

    public UserResource()

### Method Detail

#### getUserData

    public UserData getUserData()

#### setUserData

    public void setUserData​(UserData userData)

#### createUser

    @POST
    public jakarta.ws.rs.core.Response createUser​(User user)

#### createUsersWithArrayInput

    @POST
    @Path("/createWithArray")
    public jakarta.ws.rs.core.Response createUsersWithArrayInput​(User[] users)

#### createUsersWithListInput

    @POST
    @Path("/createWithList")
    public jakarta.ws.rs.core.Response createUsersWithListInput​(List<User> users)

#### updateUser

    @Path("/username/{username}")
    @PUT
    public jakarta.ws.rs.core.Response updateUser​(@PathParam("username")
                                                  String username,
                                                  User user)

#### changePassword

    @PATCH
    @Path("/username/{username}")
    public void changePassword​(@PathParam("username")
                               String username,
                               @QueryParam("currentPassword")
                               String currentPassword,
                               @QueryParam("newPassword")
                               String newPassword)

#### deleteUser

    @DELETE
    @Path("/username/{username}")
    public jakarta.ws.rs.core.Response deleteUser​(@PathParam("username")
                                                  String userName)

#### getUserByName

    @GET
    @Path("/username/{username}")
    public jakarta.ws.rs.core.Response getUserByName​(@PathParam("username")
                                                     String userName)
                                              throws NotFoundException

Throws:
  `NotFoundException`

#### getUserById

    @GET
    @Path("/id/{id}")
    public jakarta.ws.rs.core.Response getUserById​(@PathParam("id")
                                                   int id)
                                            throws NotFoundException

Throws:
  `NotFoundException`

#### loginUser

    @GET
    @Path("/login")
    public jakarta.ws.rs.core.Response loginUser​(@QueryParam("username")
                                                 String username,
                                                 @QueryParam("password")
                                                 String password)

#### logoutUser

    @GET
    @Path("/logout")
    public jakarta.ws.rs.core.Response logoutUser()

#### specialOperation

    @POST
    @Path("/special")
    public User specialOperation​(User body,
                                 @QueryParam("param1")
                                 String param1)

Operation to test hiding of request body and parameter schemas

Returns:
  a user