Skip to content
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

Merged
merged 7 commits into from
Oct 25, 2019
Merged

[Storage] Make JSDOC more consistent and fixes #5791

merged 7 commits into from
Oct 25, 2019

Conversation

joheredi
Copy link
Member

@joheredi joheredi commented Oct 24, 2019

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

@joheredi joheredi added Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files) Docs labels Oct 24, 2019
@joheredi joheredi requested a review from ramya-rao-a October 25, 2019 00:21
* @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>}
Copy link
Member

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 ]

Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logged #5806

Copy link
Member

@XiaoningLiu XiaoningLiu Oct 25, 2019

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.

Copy link
Contributor

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
Copy link
Member

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
Copy link
Member

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.
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

@jiacfan jiacfan Oct 25, 2019

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.

@ramya-rao-a
Copy link
Contributor

Addressed all comments, and resolved merge conflicts.

@XiaoningLiu and @jiacfan please take another look

Copy link
Member

@XiaoningLiu XiaoningLiu left a 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!

@ramya-rao-a
Copy link
Contributor

/azp run js - storage - ci

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ramya-rao-a ramya-rao-a merged commit 81a6e76 into Azure:master Oct 25, 2019
ramya-rao-a added a commit to HarshaNalluru/azure-sdk-for-js that referenced this pull request Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Docs Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Storage] Fix JS Docs - storage packages
4 participants