-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core) Add update and delete command Java/Rest APIs #4333
base: master
Are you sure you want to change the base?
Changes from 4 commits
4e0388e
228e66a
8a1f5da
c307a42
b7d5510
92eb6b0
18b3aeb
89004ed
ac5f84b
970ec8d
2d65b7f
97bca7c
b3b1eeb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<#macro endpoint_macro docsUrl=""> | ||
{ | ||
<@lib.endpointInfo | ||
id = "deleteProcessInstanceComments" | ||
tag = "Process Instance Comment" | ||
summary = "Delete ProcessInstance Comments" | ||
desc = "Deletes all comments of a processIntance by processInstance id." /> | ||
|
||
"parameters": [ | ||
|
||
<@lib.parameter | ||
name = "id" | ||
location = "path" | ||
type = "string" | ||
required = true | ||
last = true | ||
desc = "The id of the process instance for which all comments are to be deleted."/> | ||
|
||
], | ||
"responses": { | ||
|
||
<@lib.response | ||
code = "204" | ||
desc = "Request successful." /> | ||
|
||
<@lib.response | ||
code = "401" | ||
dto = "ExceptionDto" | ||
desc = "The authenticated user is unauthorized to delete this resource. See the | ||
[Introduction](${docsUrl}/reference/rest/overview/#error-handling) | ||
for the error response format."/> | ||
|
||
<@lib.response | ||
code = "403" | ||
dto = "AuthorizationExceptionDto" | ||
desc = "The history of the engine is disabled. See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) | ||
for the error response format." /> | ||
|
||
<@lib.response | ||
code = "500" | ||
dto = "ExceptionDto" | ||
last = true | ||
desc = "Comments of a process instance could not be deleted successfully. | ||
See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) | ||
for the error response format." /> | ||
|
||
} | ||
} | ||
</#macro> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<#macro endpoint_macro docsUrl=""> | ||
{ | ||
|
||
<@lib.endpointInfo | ||
id = "updateProcessInstanceComment" | ||
tag = "Process Instance Comment" | ||
summary = "Update" | ||
desc = "Updates a Comment." /> | ||
|
||
"parameters" : [ | ||
|
||
<@lib.parameter | ||
name = "id" | ||
location = "path" | ||
type = "string" | ||
required = true | ||
last = true | ||
desc = "The id associated of a process instance of a comment to be updated."/> | ||
|
||
], | ||
|
||
<@lib.requestBody | ||
mediaType = "application/json" | ||
dto = "CommentDto" | ||
requestDesc = "**Note:** Only the `id` and `message` properties will be used. Every other | ||
property passed to this endpoint will be ignored." | ||
examples = ['"example-1": { | ||
"summary": "PUT /process-instance/aProcessInstanceId/comment", | ||
"value": { | ||
"id": "75bc161a-12da-11e4-7d3a-f4ccdc10a445", | ||
"message": "a process instance comment" | ||
} | ||
}'] /> | ||
|
||
"responses" : { | ||
|
||
<@lib.response | ||
code = "204" | ||
desc = "Request successful." /> | ||
|
||
<@lib.response | ||
code = "400" | ||
dto = "ExceptionDto" | ||
desc = "Returned if some of the query parameters are invalid, for example if | ||
the value of `commentId` parameter is supplied as null. See the | ||
[Introduction](${docsUrl}/reference/rest/overview/#error-handling) | ||
for the error response format." /> | ||
|
||
<@lib.response | ||
code = "401" | ||
dto = "ExceptionDto" | ||
desc = "The authenticated user is unauthorized to update this resource. See the | ||
[Introduction](${docsUrl}/reference/rest/overview/#error-handling) | ||
for the error response format." /> | ||
|
||
<@lib.response | ||
code = "403" | ||
dto = "AuthorizationExceptionDto" | ||
desc = "The history of the engine is disabled. See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) | ||
for the error response format." /> | ||
|
||
<@lib.response | ||
code = "500" | ||
dto = "ExceptionDto" | ||
last = true | ||
desc = "The comment of a process instance could not be updated successfully. | ||
See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) | ||
for the error response format." /> | ||
|
||
} | ||
} | ||
|
||
</#macro> |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,59 @@ | ||||||
<#macro endpoint_macro docsUrl=""> | ||||||
{ | ||||||
|
||||||
<@lib.endpointInfo | ||||||
id = "deleteProcessInstanceComment" | ||||||
tag = "Process Instance Comment" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔧 Could you improve also the tag of |
||||||
summary = "Delete" | ||||||
desc = "Removes a comment from a process instance by id." /> | ||||||
|
||||||
"parameters" : [ | ||||||
|
||||||
<@lib.parameter | ||||||
name = "id" | ||||||
location = "path" | ||||||
type = "string" | ||||||
required = true | ||||||
desc = "The id of the processInstance." /> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔧
Suggested change
|
||||||
|
||||||
<@lib.parameter | ||||||
name = "commentId" | ||||||
location = "path" | ||||||
type = "string" | ||||||
required = true | ||||||
last = true | ||||||
desc = "The id of the comment to be removed." /> | ||||||
|
||||||
], | ||||||
|
||||||
"responses" : { | ||||||
|
||||||
<@lib.response | ||||||
code = "204" | ||||||
desc = "Request successful." /> | ||||||
|
||||||
<@lib.response | ||||||
code = "401" | ||||||
dto = "ExceptionDto" | ||||||
desc = "The authenticated user is unauthorized to delete this resource. See the | ||||||
[Introduction](${docsUrl}/reference/rest/overview/#error-handling) | ||||||
for the error response format." /> | ||||||
|
||||||
<@lib.response | ||||||
code = "403" | ||||||
dto = "AuthorizationExceptionDto" | ||||||
desc = "The history of the engine is disabled. See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) | ||||||
for the error response format." /> | ||||||
|
||||||
<@lib.response | ||||||
code = "500" | ||||||
dto = "ExceptionDto" | ||||||
last = true | ||||||
desc = "The comment of a process instance could not be deleted successfully. | ||||||
See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) | ||||||
for the error response format." /> | ||||||
|
||||||
} | ||||||
} | ||||||
|
||||||
</#macro> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<#macro endpoint_macro docsUrl=""> | ||
{ | ||
<@lib.endpointInfo | ||
id = "deleteTaskComments" | ||
tag = "Task Comment" | ||
summary = "Delete Task Comments" | ||
desc = "Deletes all comments of a task by task id." /> | ||
|
||
"parameters": [ | ||
|
||
<@lib.parameter | ||
name = "id" | ||
location = "path" | ||
type = "string" | ||
required = true | ||
last = true | ||
desc = "The id of the task for which all comments are to be deleted."/> | ||
|
||
], | ||
"responses": { | ||
|
||
<@lib.response | ||
code = "204" | ||
desc = "Request successful." /> | ||
|
||
<@lib.response | ||
code = "401" | ||
dto = "ExceptionDto" | ||
desc = "The authenticated user is unauthorized to delete this resource. See the | ||
[Introduction](${docsUrl}/reference/rest/overview/#error-handling) | ||
for the error response format." | ||
/> | ||
|
||
<@lib.response | ||
code = "403" | ||
dto = "AuthorizationExceptionDto" | ||
desc = "The history of the engine is disabled. See the [Introduction](/reference/rest/overview/#error-handling) | ||
for the error response format." /> | ||
|
||
<@lib.response | ||
code = "500" | ||
dto = "ExceptionDto" | ||
last = true | ||
desc = "Comments of a task could not be deleted successfully. | ||
See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) | ||
for the error response format." /> | ||
} | ||
} | ||
</#macro> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<#macro endpoint_macro docsUrl=""> | ||
{ | ||
|
||
<@lib.endpointInfo | ||
id = "updateTaskComment" | ||
tag = "Task Comment" | ||
summary = "Update" | ||
desc = "Updates a Comment." /> | ||
|
||
"parameters" : [ | ||
|
||
<@lib.parameter | ||
name = "id" | ||
location = "path" | ||
type = "string" | ||
required = true | ||
last = true | ||
desc = "The id associated of a task of a comment to be updated."/> | ||
|
||
], | ||
|
||
<@lib.requestBody | ||
mediaType = "application/json" | ||
dto = "CommentDto" | ||
requestDesc = "**Note:** Only the `id` and `message` properties will be used. Every other | ||
property passed to this endpoint will be ignored." | ||
examples = ['"example-1": { | ||
"summary": "PUT /task/aTaskId/comment", | ||
"value": { | ||
"id": "86cd272a-23ea-22e5-8e4a-e5bded20a556", | ||
"message": "a task comment" | ||
} | ||
}'] /> | ||
|
||
"responses" : { | ||
|
||
<@lib.response | ||
code = "204" | ||
desc = "Request successful." /> | ||
|
||
<@lib.response | ||
code = "401" | ||
dto = "ExceptionDto" | ||
desc = "The authenticated user is unauthorized to update this resource. See the | ||
[Introduction](${docsUrl}/reference/rest/overview/#error-handling) | ||
for the error response format."/> | ||
|
||
<@lib.response | ||
code = "403" | ||
dto = "AuthorizationExceptionDto" | ||
desc = "The history of the engine is disabled. See the [Introduction](/reference/rest/overview/#error-handling) | ||
for the error response format." /> | ||
|
||
<@lib.response | ||
code = "500" | ||
dto = "ExceptionDto" | ||
last = true | ||
desc = "The comment of a task could not be updated successfully. | ||
See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) | ||
for the error response format." /> | ||
} | ||
} | ||
|
||
</#macro> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<#macro endpoint_macro docsUrl=""> | ||
{ | ||
|
||
<@lib.endpointInfo | ||
id = "deleteTaskComment" | ||
tag = "Task Comment" | ||
summary = "Delete" | ||
desc = "Removes a comment from a task by id." /> | ||
|
||
"parameters" : [ | ||
|
||
<@lib.parameter | ||
name = "id" | ||
location = "path" | ||
type = "string" | ||
required = true | ||
desc = "The id of the task." /> | ||
|
||
<@lib.parameter | ||
name = "commentId" | ||
location = "path" | ||
type = "string" | ||
required = true | ||
last = true | ||
desc = "The id of the comment to be removed." /> | ||
|
||
], | ||
|
||
"responses" : { | ||
|
||
<@lib.response | ||
code = "204" | ||
desc = "Request successful." /> | ||
|
||
<@lib.response | ||
code = "401" | ||
dto = "ExceptionDto" | ||
desc = "The authenticated user is unauthorized to delete this resource. See the | ||
[Introduction](${docsUrl}/reference/rest/overview/#error-handling) | ||
for the error response format."/> | ||
|
||
<@lib.response | ||
code = "403" | ||
dto = "AuthorizationExceptionDto" | ||
desc = "The history of the engine is disabled. See the [Introduction](/reference/rest/overview/#error-handling) | ||
for the error response format." /> | ||
|
||
<@lib.response | ||
code = "500" | ||
dto = "ExceptionDto" | ||
last = true | ||
desc = "The comment of a task could not be deleted successfully. | ||
See the [Introduction](${docsUrl}/reference/rest/overview/#error-handling) | ||
for the error response format." /> | ||
|
||
} | ||
} | ||
|
||
</#macro> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 Improve wording: