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

## Class UserResource

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

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

### Constructor Summary

Constructors
Constructor and Description
`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(value="/createWithArray")
    public jakarta.ws.rs.core.Response createUsersWithArrayInput(User[] users)

#### createUsersWithListInput

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

#### updateUser

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

#### changePassword

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

#### deleteUser

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

#### getUserByName

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

Throws:
  `NotFoundException`

#### getUserById

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

Throws:
  `NotFoundException`

#### loginUser

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

#### logoutUser

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

#### specialOperation

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

Operation to test hiding of request body and parameter schemas

Returns:
  a user