mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
improve javadoc of ChangePasswordResource for the webservice documentation
This commit is contained in:
@@ -38,6 +38,7 @@ package sonia.scm.api.rest.resources;
|
|||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.google.inject.Provider;
|
import com.google.inject.Provider;
|
||||||
|
|
||||||
|
import org.codehaus.enunciate.jaxrs.TypeHint;
|
||||||
import org.codehaus.enunciate.modules.jersey.SpringManagedLifecycle;
|
import org.codehaus.enunciate.modules.jersey.SpringManagedLifecycle;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@@ -100,11 +101,17 @@ public class ChangePasswordResource
|
|||||||
//~--- methods --------------------------------------------------------------
|
//~--- methods --------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method description
|
* Changes the password of the current user.<br />
|
||||||
|
* <br />
|
||||||
|
* Status codes:
|
||||||
|
* <ul>
|
||||||
|
* <li>200 success</li>
|
||||||
|
* <li>400 bad request, the old password is not correct</li>
|
||||||
|
* <li>500 internal server error</li>
|
||||||
|
* </ul>
|
||||||
*
|
*
|
||||||
*
|
* @param oldPassword old password of the current user
|
||||||
* @param oldPassword
|
* @param newPassword new password for the current user
|
||||||
* @param newPassword
|
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*
|
*
|
||||||
@@ -112,6 +119,7 @@ public class ChangePasswordResource
|
|||||||
* @throws UserException
|
* @throws UserException
|
||||||
*/
|
*/
|
||||||
@POST
|
@POST
|
||||||
|
@TypeHint(RestActionResult.class)
|
||||||
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
|
||||||
public Response changePassword(@FormParam("old-password") String oldPassword,
|
public Response changePassword(@FormParam("old-password") String oldPassword,
|
||||||
@FormParam("new-password") String newPassword)
|
@FormParam("new-password") String newPassword)
|
||||||
|
|||||||
Reference in New Issue
Block a user