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

Add REST API Documentation Links #4557

Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ public URL getQueueUrl() {
*
* {@codesnippet com.azure.storage.queue.queueAsyncClient.create}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/create-queue4">Azure Docs</a>.</p>
Copy link
Member

Choose a reason for hiding this comment

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

Instead of generic "Azure Docs", it's nice to see where this links to like: "Azure Docs: Create queue"

Copy link
Member

@samvaity samvaity Jul 26, 2019

Choose a reason for hiding this comment

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

Yup, even I think something like this "Azure Docs: Create queue" could be useful!

Copy link
Member

Choose a reason for hiding this comment

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

+1, will this mean, that we will need to update the azure docs format in blob api too, to ensure consistency?

*
* @return A response that only contains headers and response status code
* @throws StorageErrorException If a queue with the same name already exists in the queue service.
*/
Expand All @@ -124,6 +127,9 @@ public Mono<VoidResponse> create() {
*
* {@codesnippet com.azure.storage.queue.queueAsyncClient.create#map}
*
* <p>For more information, see the
Copy link
Member

Choose a reason for hiding this comment

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

Adding Rest docs link in javadocs,
Is this some standard guideline that all track 2 SDKs need to follow ?
Also, what happens when REST API docs link updates to a new version which doesn't correspond to our implemented SDK?

Copy link
Member Author

Choose a reason for hiding this comment

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

This isn't a guideline for Track 2 SDKs, more of a nice to have feature given the depth of complexity in some of the Storage REST APIs. Additionally, Blobs has REST API doc links in previous versions and in Preview 1, so it is being consistent with it.

Copy link
Member

Choose a reason for hiding this comment

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

@g2vinay in general, changes to our rest surface are only additive, and each parameter that was an addition at some point in time has a minimum version prominent in the description. If there is ever a breaking change to our rest surface, it is handled on a case by case basis. However, we don't diverge documentation pages. I would be impressed if one of these links became obsolete or problematic.

Copy link
Member

Choose a reason for hiding this comment

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

Huh. So I'm looking into our links a bit more. It seems that we may break links, but I'm having trouble finding a scenario where we would direct you to the wrong one.

* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/create-queue4">Azure Docs</a>.</p>
*
* @param metadata Metadata to associate with the queue
* @return A response that only contains headers and response status code
* @throws StorageErrorException If a queue with the same name and different metadata already exists in the queue service.
Expand All @@ -142,6 +148,9 @@ public Mono<VoidResponse> create(Map<String, String> metadata) {
*
* {@codesnippet com.azure.storage.queue.queueAsyncClient.delete}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/delete-queue3">Azure Docs</a>.</p>
*
* @return A response that only contains headers and response status code
* @throws StorageErrorException If the queue doesn't exist
*/
Expand All @@ -159,6 +168,9 @@ public Mono<VoidResponse> delete() {
*
* {@codesnippet com.azure.storage.queue.queueAsyncClient.getProperties}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/get-queue-metadata">Azure Docs</a>.</p>
*
* @return A response containing a {@link QueueProperties} value which contains the metadata and approximate
* messages count of the queue.
* @throws StorageErrorException If the queue doesn't exist
Expand All @@ -183,6 +195,9 @@ public Mono<Response<QueueProperties>> getProperties() {
*
* {@codesnippet com.azure.storage.queue.queueAsyncClient.clearMetadata#map}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/set-queue-metadata">Azure Docs</a>.</p>
*
* @param metadata Metadata to set on the queue
* @return A response that only contains headers and response status code
* @throws StorageErrorException If the queue doesn't exist
Expand All @@ -201,6 +216,9 @@ public Mono<VoidResponse> setMetadata(Map<String, String> metadata) {
*
* {@codesnippet com.azure.storage.queue.queueAsyncClient.getAccessPolicy}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/get-queue-acl">Azure Docs</a>.</p>
*
* @return The stored access policies specified on the queue.
* @throws StorageErrorException If the queue doesn't exist
*/
Expand All @@ -218,6 +236,9 @@ public Flux<SignedIdentifier> getAccessPolicy() {
*
* {@codesnippet com.azure.storage.queue.queueAsyncClient.setAccessPolicy}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/set-queue-acl">Azure Docs</a>.</p>
*
* @param permissions Access policies to set on the queue
* @return A response that only contains headers and response status code
* @throws StorageErrorException If the queue doesn't exist, a stored access policy doesn't have all fields filled out,
Expand All @@ -237,6 +258,9 @@ public Mono<VoidResponse> setAccessPolicy(List<SignedIdentifier> permissions) {
*
* {@codesnippet com.azure.storage.queue.queueAsyncClient.clearMessages}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/clear-messages">Azure Docs</a>.</p>
*
* @return A response that only contains headers and response status code
* @throws StorageErrorException If the queue doesn't exist
*/
Expand All @@ -254,6 +278,9 @@ public Mono<VoidResponse> clearMessages() {
*
* {@codesnippet com.azure.storage.queue.queueAsyncClient.enqueueMessage#string}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/put-message">Azure Docs</a>.</p>
*
* @param messageText Message text
* @return A {@link EnqueuedMessage} value that contains the {@link EnqueuedMessage#messageId() messageId} and
* {@link EnqueuedMessage#popReceipt() popReceipt} that are used to interact with the message and other metadata
Expand All @@ -277,6 +304,9 @@ public Mono<Response<EnqueuedMessage>> enqueueMessage(String messageText) {
*
* {@codesnippet com.azure.storage.queue.queueAsyncClient.enqueueMessageLiveTime#string-duration-duration}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/put-message">Azure Docs</a>.</p>
*
* @param messageText Message text
* @param visibilityTimeout Optional. The timeout period for how long the message is invisible in the queue in seconds.
* If unset the value will default to 0 and the message will be instantly visible. The timeout must be between 0
Expand Down Expand Up @@ -307,6 +337,9 @@ public Mono<Response<EnqueuedMessage>> enqueueMessage(String messageText, Durati
*
* {@codesnippet com.azure.storage.queue.queueAsyncClient.dequeueMessages}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/get-messages">Azure Docs</a>.</p>
*
* @return The first {@link DequeuedMessage} in the queue, it contains
* {@link DequeuedMessage#messageId() messageId} and {@link DequeuedMessage#popReceipt() popReceipt} used to interact
* with the message, additionally it contains other metadata about the message.
Expand All @@ -325,6 +358,9 @@ public Flux<DequeuedMessage> dequeueMessages() {
*
* {@codesnippet com.azure.storage.queue.queueAsyncClient.dequeueMessages#integer}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/get-messages">Azure Docs</a>.</p>
*
* @param maxMessages Optional. Maximum number of messages to get, if there are less messages exist in the queue than requested
* all the messages will be returned. If left empty only 1 message will be retrieved, the allowed range is 1 to 32
* messages.
Expand All @@ -347,6 +383,9 @@ public Flux<DequeuedMessage> dequeueMessages(Integer maxMessages) {
*
* {@codesnippet com.azure.storage.queue.queueAsyncClient.dequeueMessages#integer-duration}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/get-messages">Azure Docs</a>.</p>
*
* @param maxMessages Optional. Maximum number of messages to get, if there are less messages exist in the queue than requested
* all the messages will be returned. If left empty only 1 message will be retrieved, the allowed range is 1 to 32
* messages.
Expand Down Expand Up @@ -376,6 +415,9 @@ public Flux<DequeuedMessage> dequeueMessages(Integer maxMessages, Duration visib
*
* {@codesnippet com.azure.storage.queue.queueAsyncClient.peekMessages}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/peek-messages">Azure Docs</a>.</p>
*
* @return A {@link PeekedMessage} that contains metadata about the message.
*/
public Flux<PeekedMessage> peekMessages() {
Expand All @@ -394,6 +436,9 @@ public Flux<PeekedMessage> peekMessages() {
*
* {@codesnippet com.azure.storage.queue.queueAsyncClient.peekMessages#integer}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/peek-messages">Azure Docs</a>.</p>
*
* @param maxMessages Optional. Maximum number of messages to peek, if there are less messages exist in the queue than requested
* all the messages will be peeked. If left empty only 1 message will be peeked, the allowed range is 1 to 32
* messages.
Expand All @@ -415,6 +460,9 @@ public Flux<PeekedMessage> peekMessages(Integer maxMessages) {
*
* {@codesnippet com.azure.storage.queue.queueAsyncClient.updateMessage}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/update-message">Azure Docs</a>.</p>
*
* @param messageText Updated value for the message
* @param messageId Id of the message to update
* @param popReceipt Unique identifier that must match for the message to be updated
Expand All @@ -440,6 +488,9 @@ public Mono<Response<UpdatedMessage>> updateMessage(String messageText, String m
*
* {@codesnippet com.azure.storage.queue.queueAsyncClient.deleteMessage}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/delete-message2">Azure Docs</a>.</p>
*
* @param messageId Id of the message to deleted
* @param popReceipt Unique identifier that must match for the message to be deleted
* @return A response that only contains headers and response status code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public URL getQueueUrl() {
*
*{@codesnippet com.azure.storage.queue.queueClient.create}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/create-queue4">Azure Docs</a>.</p>
*
* @return A response that only contains headers and response status code
* @throws StorageErrorException If a queue with the same name already exists in the queue service.
*/
Expand All @@ -79,6 +82,9 @@ public VoidResponse create() {
*
* {@codesnippet com.azure.storage.queue.queueClient.create#map}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/create-queue4">Azure Docs</a>.</p>
*
* @param metadata Metadata to associate with the queue
* @return A response that only contains headers and response status code
* @throws StorageErrorException If a queue with the same name and different metadata already exists in the queue service.
Expand All @@ -96,6 +102,9 @@ public VoidResponse create(Map<String, String> metadata) {
*
* {@codesnippet com.azure.storage.queue.queueClient.delete}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/delete-queue3">Azure Docs</a>.</p>
*
* @return A response that only contains headers and response status code
* @throws StorageErrorException If the queue doesn't exist
*/
Expand All @@ -112,6 +121,9 @@ public VoidResponse delete() {
*
* {@codesnippet com.azure.storage.queue.queueClient.getProperties}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/get-queue-metadata">Azure Docs</a>.</p>
*
* @return A response containing a {@link QueueProperties} value which contains the metadata and approximate
* messages count of the queue.
* @throws StorageErrorException If the queue doesn't exist
Expand All @@ -135,6 +147,9 @@ public Response<QueueProperties> getProperties() {
*
* {@codesnippet com.azure.storage.queue.queueClient.clearMetadata#map}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/set-queue-metadata">Azure Docs</a>.</p>
*
* @param metadata Metadata to set on the queue
* @return A response that only contains headers and response status code
* @throws StorageErrorException If the queue doesn't exist
Expand All @@ -152,6 +167,9 @@ public VoidResponse setMetadata(Map<String, String> metadata) {
*
* {@codesnippet com.azure.storage.queue.queueClient.getAccessPolicy}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/get-queue-acl">Azure Docs</a>.</p>
*
* @return The stored access policies specified on the queue.
* @throws StorageErrorException If the queue doesn't exist
*/
Expand All @@ -168,6 +186,9 @@ public Iterable<SignedIdentifier> getAccessPolicy() {
*
* {@codesnippet com.azure.storage.queue.queueClient.setAccessPolicy}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/set-queue-acl">Azure Docs</a>.</p>
*
* @param permissions Access policies to set on the queue
* @return A response that only contains headers and response status code
* @throws StorageErrorException If the queue doesn't exist, a stored access policy doesn't have all fields filled out,
Expand All @@ -186,6 +207,9 @@ public VoidResponse setAccessPolicy(List<SignedIdentifier> permissions) {
*
* {@codesnippet com.azure.storage.queue.queueClient.clearMessages}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/clear-messages">Azure Docs</a>.</p>
*
* @return A response that only contains headers and response status code
* @throws StorageErrorException If the queue doesn't exist
*/
Expand All @@ -202,6 +226,9 @@ public VoidResponse clearMessages() {
*
* {@codesnippet com.azure.storage.queue.queueClient.enqueueMessage#string}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/put-message">Azure Docs</a>.</p>
*
* @param messageText Message text
* @return A {@link EnqueuedMessage} value that contains the {@link EnqueuedMessage#messageId() messageId} and
* {@link EnqueuedMessage#popReceipt() popReceipt} that are used to interact with the message and other metadata
Expand All @@ -225,6 +252,9 @@ public Response<EnqueuedMessage> enqueueMessage(String messageText) {
*
* {@codesnippet com.azure.storage.queue.queueClient.enqueueMessageLiveTime#string-duration-duration}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/put-message">Azure Docs</a>.</p>
*
* @param messageText Message text
* @param visibilityTimeout Optional. The timeout period for how long the message is invisible in the queue in seconds.
* If unset the value will default to 0 and the message will be instantly visible. The timeout must be between 0
Expand All @@ -250,6 +280,9 @@ public Response<EnqueuedMessage> enqueueMessage(String messageText, Duration vis
*
* {@codesnippet com.azure.storage.queue.queueClient.dequeueMessages}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/get-messages">Azure Docs</a>.</p>
*
* @return The first {@link DequeuedMessage} in the queue, it contains
* {@link DequeuedMessage#messageId() messageId} and {@link DequeuedMessage#popReceipt() popReceipt} used to interact
* with the message, additionally it contains other metadata about the message.
Expand All @@ -268,6 +301,9 @@ public Iterable<DequeuedMessage> dequeueMessages() {
*
* {@codesnippet com.azure.storage.queue.queueClient.dequeueMessages#integer}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/get-messages">Azure Docs</a>.</p>
*
* @param maxMessages Optional. Maximum number of messages to get, if there are less messages exist in the queue than requested
* all the messages will be returned. If left empty only 1 message will be retrieved, the allowed range is 1 to 32
* messages.
Expand All @@ -290,6 +326,9 @@ public Iterable<DequeuedMessage> dequeueMessages(Integer maxMessages) {
*
* {@codesnippet com.azure.storage.queue.queueClient.dequeueMessages#integer-duration}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/get-messages">Azure Docs</a>.</p>
*
* @param maxMessages Optional. Maximum number of messages to get, if there are less messages exist in the queue than requested
* all the messages will be returned. If left empty only 1 message will be retrieved, the allowed range is 1 to 32
* messages.
Expand Down Expand Up @@ -317,6 +356,9 @@ public Iterable<DequeuedMessage> dequeueMessages(Integer maxMessages, Duration v
*
* {@codesnippet com.azure.storage.queue.queueClient.peekMessages}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/peek-messages">Azure Docs</a>.</p>
*
* @return A {@link PeekedMessage} that contains metadata about the message.
*/
public Iterable<PeekedMessage> peekMessages() {
Expand All @@ -335,6 +377,9 @@ public Iterable<PeekedMessage> peekMessages() {
*
* {@codesnippet com.azure.storage.queue.queueClient.peekMessages#integer}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/peek-messages">Azure Docs</a>.</p>
*
* @param maxMessages Optional. Maximum number of messages to peek, if there are less messages exist in the queue than requested
* all the messages will be peeked. If left empty only 1 message will be peeked, the allowed range is 1 to 32
* messages.
Expand All @@ -355,6 +400,9 @@ public Iterable<PeekedMessage> peekMessages(Integer maxMessages) {
*
* {@codesnippet com.azure.storage.queue.queueClient.updateMessage}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/update-message">Azure Docs</a>.</p>
*
* @param messageText Updated value for the message
* @param messageId Id of the message to update
* @param popReceipt Unique identifier that must match for the message to be updated
Expand All @@ -378,6 +426,9 @@ public Response<UpdatedMessage> updateMessage(String messageText, String message
*
* {@codesnippet com.azure.storage.queue.queueClient.deleteMessage}
*
* <p>For more information, see the
* <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/delete-message2">Azure Docs</a>.</p>
*
* @param messageId Id of the message to deleted
* @param popReceipt Unique identifier that must match for the message to be deleted
* @return A response that only contains headers and response status code
Expand Down
Loading