-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Storage] Make JSDOC more consistent and fixes #5791
Conversation
* @param {AppendBlobCreateOptions} [options] Options to the Append Block Create operation. | ||
* @returns {Promise<AppendBlobsCreateResponse>} | ||
* @param {AppendBlobCreateOptions} options Options to the Append Block Create operation. | ||
* @returns {Promise<AppendBlobCreateResponse>} |
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.
[options] means options is optional. I don't think you should remove [ and ]
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.
@XiaoningLiu Can you elaborate on this comment? We are removing the square brackets around the parameters across the library and other libraries.
Have you been using the square brackets to indicate that a parameter is optional? Can you point us to any documentation where the square brackets are meant to be used for optional parameters?
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.
Never mind, I found something. https://jsdoc.app/tags-param.html#optional-parameters-and-default-values
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.
logged #5806
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.
Thanks Ramya! I do understand the code freeze date is almost there. But please take some time to update the PR and bring squares back, I don't think there is a solid reason to against JSDoc standard about optional parameters and parameters with default values. Customers may mistakenly take optional parameters as reuqired if removing them. Please have an update, then it's good to merge.
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 the PR and brought back the [] that were removed.
@@ -322,6 +322,13 @@ export class BlobDownloadResponse implements BlobDownloadResponseModel { | |||
return this.originalResponse.etag; | |||
} | |||
|
|||
/** | |||
* The error code |
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.
minor: missing . at end
@@ -465,6 +475,12 @@ export class BlobDownloadResponse implements BlobDownloadResponseModel { | |||
return isNode ? this.blobDownloadStream : undefined; | |||
} | |||
|
|||
/** | |||
* The HTTP response |
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.
minor: missing . at end
*/ | ||
includeDeleted?: boolean; | ||
/** | ||
* @member {boolean} [includeMetadata] Specifies whether blob metadata be returned in the response. | ||
* @member {boolean}[includeMetadata Specifies whether blob metadata be returned in the response. |
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.
typo, and please consider to bring back the [
@@ -105,7 +105,8 @@ export interface AccountSASSignatureValues { | |||
* | |||
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas | |||
* | |||
* @param {SharedKeyCredential} sharedKeyCredential | |||
* @param {AccountSASSignatureValues} accountSASSignatureValues SAS Signature values of the account | |||
* @param {SharedKeyCredential} sharedKeyCredential Shared key credential |
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.
minor: missing . at end
@@ -929,8 +928,9 @@ export class QueueClient extends StorageClient { | |||
* Delete permanently removes the specified message from its queue. | |||
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-message2 | |||
* | |||
* @param {string} messageId Id of the message |
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.
minor: missing . at end, please check others if availabe
@@ -569,7 +572,8 @@ export class QueueServiceClient extends StorageClient { | |||
* Deletes the specified queue permanently. | |||
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-queue3 | |||
* | |||
* @param {QueueDeleteOptions} [options] Options to Queue delete operation. | |||
* @param {string} queueName name of the queue to delete |
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.
minor: . at end
@@ -141,6 +141,12 @@ function getProxyUriFromDevConnString(connectionString: string): string { | |||
return proxyUri; | |||
} | |||
|
|||
/** | |||
* | |||
* @param {string} connectionString Account connection 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.
minor: . at end, please check other in this file as well.
…for-js into pr/joheredi/5791
Addressed all comments, and resolved merge conflicts. @XiaoningLiu and @jiacfan please take another look |
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.
Looks good. Thanks Ramya!
/azp run js - storage - ci |
Azure Pipelines successfully started running 1 pipeline(s). |
Fixes #5657
A few of the things that I went over for this PR:
Removed locale from URLs
Remove the use of [] (square brackets) for parameter and property names to avoid them to render in the docs. Also, to achieve consistency with other libraries
Fix outdated @memberof annotations from past renames
Fix missing parameter annotations
Fix wrong type annotations
Add a few missing JSDOC headers