-
Notifications
You must be signed in to change notification settings - Fork 25
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
[MNT-24127] Added Endpoint To Calculate Folder Size #213
[MNT-24127] Added Endpoint To Calculate Folder Size #213
Conversation
It's recommended to add Jira ticket number in square bracket in title at start. This will link the PR to the corresponding Jira ticket. Also It's a good practise to add jira ttcket link in the description. |
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.
Update the title and description
@@ -2484,6 +2491,92 @@ paths: | |||
description: Unexpected error | |||
schema: | |||
$ref: '#/definitions/Error' | |||
'/nodes/{nodeId}/calculateSize': | |||
post: | |||
x-alfresco-since: "5.2" |
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.
Are we supporting this API from ACS 5.2 ?
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.
No, I have removed the same.
schema: | ||
$ref: '#/definitions/Error' | ||
get: | ||
x-alfresco-since: "5.2" |
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.
Same as above. Are we supporting this API from ACS 5.2 ?
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.
No, I have removed the same.
post: | ||
tags: | ||
- nodes | ||
summary: Calculate a folder size |
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.
Are we supporting the API to calculate the size of a file. If yes, then we shd mention in the description.
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.
We are only calculating the size of a folder not file.
default: | ||
description: Unexpected error | ||
schema: | ||
$ref: '#/definitions/Error' |
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.
What error code are we returning in case its a valid node id but this is a retention-schedule node id i.e. invalid node type
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.
We are returning 404- nodeId does not exist, as we are only considering folder type node.
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.
But here node id exist in the system but it has different node type. I think we should have a different message and may be status code as well. Please check other endpoints.
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.
Updated with 400 status code. with description
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.
Plz once validate the message with other endpoints in the swagger so that we are having similar standards. Rest looks good to me.
calculatedAtTime: | ||
type: string | ||
status: | ||
type: string |
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.
It's a good practice to add description for all the fields.
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.
Done
type: object | ||
properties: | ||
executionId: | ||
type: string |
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.
Same as above. Add the desctiption for the field.
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.
Done
type: string | ||
description: Provides the time when the calculating folder size will be completed. | ||
status: | ||
type: string |
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.
I think we should have "number of files" field in the response. This was earlier part of RFC confluence page as well and is in sync with the requirement from Product Manager.
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.
Added the same.
Done
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.
LGTM
This reverts commit d0c1ddb.
https://hyland.atlassian.net/browse/MNT-24127