Fixup force delete action documentation (#1042)
This was doing a GET request and didn't even specify the action ID. Signed-off-by: Stefan Schake <stefan.schake@devolo.de>
This commit is contained in:
@@ -373,11 +373,11 @@ include::{snippets}/targets/delete-action-from-target/path-parameters.adoc[]
|
|||||||
|
|
||||||
==== Request query parameter
|
==== Request query parameter
|
||||||
|
|
||||||
include::{snippets}/targets/delete-actions-from-target-with-parameters/request-parameters.adoc[]
|
include::{snippets}/targets/delete-action-from-target-with-parameters/request-parameters.adoc[]
|
||||||
|
|
||||||
==== Request parameter example
|
==== Request parameter example
|
||||||
|
|
||||||
include::{snippets}/targets/delete-actions-from-target-with-parameters/http-request.adoc[]
|
include::{snippets}/targets/delete-action-from-target-with-parameters/http-request.adoc[]
|
||||||
|
|
||||||
=== Response (Status 204)
|
=== Response (Status 204)
|
||||||
|
|
||||||
|
|||||||
@@ -308,13 +308,17 @@ public class TargetResourceDocumentationTest extends AbstractApiRestDocumentatio
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Description("Handles the GET request of retrieving all targets within SP based by parameter. Required Permission: READ_TARGET.")
|
@Description("Optionally force quits an active action, only active actions can be deleted. Required Permission: UPDATE_TARGET.")
|
||||||
public void deleteActionsFromTargetWithParameters() throws Exception {
|
public void deleteActionFromTargetWithParameters() throws Exception {
|
||||||
generateActionForTarget(targetId);
|
final Action action = generateActionForTarget(targetId, false);
|
||||||
|
deploymentManagement.cancelAction(action.getId());
|
||||||
|
|
||||||
mockMvc.perform(get(MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/" + targetId + "/"
|
mockMvc.perform(delete(MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/"
|
||||||
+ MgmtRestConstants.TARGET_V1_ACTIONS + "?force=true")).andExpect(status().isOk())
|
+ MgmtRestConstants.TARGET_V1_ACTIONS + "/{actionId}?force=true", targetId, action.getId()))
|
||||||
.andDo(MockMvcResultPrinter.print()).andDo(this.document.document(
|
.andExpect(status().isNoContent()).andDo(MockMvcResultPrinter.print())
|
||||||
|
.andDo(this.document.document(
|
||||||
|
pathParameters(parameterWithName("targetId").description(ApiModelPropertiesGeneric.ITEM_ID),
|
||||||
|
parameterWithName("actionId").description(ApiModelPropertiesGeneric.ITEM_ID)),
|
||||||
requestParameters(parameterWithName("force").description(MgmtApiModelProperties.FORCE))));
|
requestParameters(parameterWithName("force").description(MgmtApiModelProperties.FORCE))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user