-
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
Open
prajwolbhandari1
wants to merge
13
commits into
camunda:master
Choose a base branch
from
fidelity-contributions:finalRepoCommentsApis
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
4e0388e
feat(engine) Add update and delete Java/Rest APIs of task and process…
prajwolbhandari1 228e66a
feat(engine-rest-core) Add update and delete Java/Rest APIs of task a…
prajwolbhandari1 8a1f5da
feat(engine-rest-openapi) Add update and delete Java/Rest APIs of tas…
prajwolbhandari1 c307a42
chore(engine) added git issue number in newly created files.
prajwolbhandari1 b7d5510
feat(engine)
prajwolbhandari1 92eb6b0
feat(engine) update task_assign authorization to task_work for delete…
prajwolbhandari1 18b3aeb
Merge branch 'master' into finalRepoCommentsApis
prajwolbhandari1 89004ed
delete cockroachdb files
prajwolbhandari1 ac5f84b
Feedback Adjustments
prajwolbhandari1 970ec8d
Fix engine-rest tests
prajwolbhandari1 2d65b7f
Fix merge conflicts with master
prajwolbhandari1 97bca7c
Merge branch 'master' into finalRepoCommentsApis
prajwolbhandari1 b3b1eeb
Merge branch 'master' into finalRepoCommentsApis
prajwolbhandari1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
...est/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/comment/delete.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<#macro endpoint_macro docsUrl=""> | ||
{ | ||
<@lib.endpointInfo | ||
id = "deleteProcessInstanceComments" | ||
tag = "Process Instance Comment" | ||
summary = "Delete ProcessInstance Comments" | ||
desc = "Deletes all comments of a process instance by 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 = "400" | ||
dto = "ExceptionDto" | ||
last = true | ||
desc = "Returned if a given process instance id is invalid. | ||
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 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
...e-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/comment/put.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<#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 a given process instance id or comment id is invalid. | ||
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> |
66 changes: 66 additions & 0 deletions
66
...est-openapi/src/main/templates/paths/process-instance/{id}/comment/{commentId}/delete.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<#macro endpoint_macro docsUrl=""> | ||
{ | ||
|
||
<@lib.endpointInfo | ||
id = "deleteProcessInstanceComment" | ||
tag = "Process Instance Comment" | ||
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 process instance." /> | ||
|
||
<@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 = "400" | ||
dto = "ExceptionDto" | ||
last = true | ||
desc = "Returned if a given process instance id or comment id is invalid. | ||
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 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> |
56 changes: 56 additions & 0 deletions
56
engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/comment/delete.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<#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 = "400" | ||
dto = "ExceptionDto" | ||
last = true | ||
desc = "Returned if a given task id is invalid. | ||
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 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> |
71 changes: 71 additions & 0 deletions
71
engine-rest/engine-rest-openapi/src/main/templates/paths/task/{id}/comment/put.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<#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 = "400" | ||
dto = "ExceptionDto" | ||
last = true | ||
desc = "Returned if a given task id or comment id is invalid. | ||
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](/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> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🔧 Could you improve also the tag of
/camunda-bpm-platform/engine-rest/engine-rest-openapi/src/main/templates/paths/process-instance/{id}/comment/get.ftl
to be the same?