mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 00:45:44 +01:00
Document return codes
This commit is contained in:
@@ -80,6 +80,7 @@ public class GroupCollectionResource {
|
|||||||
@ResponseHeader(name = "Location", description = "uri to the created group")
|
@ResponseHeader(name = "Location", description = "uri to the created group")
|
||||||
}),
|
}),
|
||||||
@ResponseCode(code = 403, condition = "forbidden, the current user has no admin privileges"),
|
@ResponseCode(code = 403, condition = "forbidden, the current user has no admin privileges"),
|
||||||
|
@ResponseCode(code = 409, condition = "conflict, a group with this name already exists"),
|
||||||
@ResponseCode(code = 500, condition = "internal server error")
|
@ResponseCode(code = 500, condition = "internal server error")
|
||||||
})
|
})
|
||||||
@TypeHint(TypeHint.NO_CONTENT.class)
|
@TypeHint(TypeHint.NO_CONTENT.class)
|
||||||
|
|||||||
@@ -80,8 +80,11 @@ public class UserCollectionResource {
|
|||||||
@POST
|
@POST
|
||||||
@Path("")
|
@Path("")
|
||||||
@StatusCodes({
|
@StatusCodes({
|
||||||
@ResponseCode(code = 201, condition = "create success"),
|
@ResponseCode(code = 201, condition = "create success", additionalHeaders = {
|
||||||
|
@ResponseHeader(name = "Location", description = "uri to the created user")
|
||||||
|
}),
|
||||||
@ResponseCode(code = 403, condition = "forbidden, the current user does not have the \"user\" privilege"),
|
@ResponseCode(code = 403, condition = "forbidden, the current user does not have the \"user\" privilege"),
|
||||||
|
@ResponseCode(code = 409, condition = "conflict, a user with this name already exists"),
|
||||||
@ResponseCode(code = 500, condition = "internal server error")
|
@ResponseCode(code = 500, condition = "internal server error")
|
||||||
})
|
})
|
||||||
@TypeHint(TypeHint.NO_CONTENT.class)
|
@TypeHint(TypeHint.NO_CONTENT.class)
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ public class UserResource {
|
|||||||
@StatusCodes({
|
@StatusCodes({
|
||||||
@ResponseCode(code = 204, condition = "update success"),
|
@ResponseCode(code = 204, condition = "update success"),
|
||||||
@ResponseCode(code = 403, condition = "forbidden, the current user does not have the \"user\" privilege"),
|
@ResponseCode(code = 403, condition = "forbidden, the current user does not have the \"user\" privilege"),
|
||||||
|
@ResponseCode(code = 404, condition = "not found, no user with the specified id/name available"),
|
||||||
@ResponseCode(code = 500, condition = "internal server error")
|
@ResponseCode(code = 500, condition = "internal server error")
|
||||||
})
|
})
|
||||||
@TypeHint(TypeHint.NO_CONTENT.class)
|
@TypeHint(TypeHint.NO_CONTENT.class)
|
||||||
|
|||||||
Reference in New Issue
Block a user