Skip to content

Commit

Permalink
Adding beta annotation (Azure#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
anuchandy authored and jianghaolu committed Aug 24, 2018
1 parent 057546c commit fef3f0e
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 21 deletions.
4 changes: 0 additions & 4 deletions azure-client-authentication/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@
<groupId>com.microsoft.azure</groupId>
<artifactId>adal4j</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-annotations</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
import com.google.common.reflect.TypeToken;
import com.microsoft.azure.v2.AzureEnvironment;
import com.microsoft.azure.v2.AzureEnvironment.Endpoint;
import com.microsoft.azure.management.apigeneration.Beta;
import com.microsoft.azure.management.apigeneration.Beta.SinceVersion;
import com.microsoft.rest.v2.annotations.Beta;
import com.microsoft.rest.v2.serializer.JacksonAdapter;

import java.io.File;
Expand All @@ -26,7 +25,7 @@
/**
* This class describes the information from a .azureauth file.
*/
@Beta(SinceVersion.V1_1_0)
@Beta(since = "v1.1.0")
final class AuthFile {

private String clientId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.microsoft.azure.v2.AzureEnvironment;
import com.microsoft.azure.management.apigeneration.Beta;
import com.microsoft.rest.v2.annotations.Beta;
import com.microsoft.rest.v2.serializer.JacksonAdapter;

import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import com.microsoft.aad.adal4j.AuthenticationResult;
import com.microsoft.azure.v2.AzureEnvironment;
import com.microsoft.azure.management.apigeneration.Beta;
import com.microsoft.rest.v2.annotations.Beta;

import java.io.IOException;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.aad.adal4j.AuthenticationResult;
import com.microsoft.azure.management.apigeneration.Beta;
import com.microsoft.rest.v2.annotations.Beta;

import java.time.Instant;
import java.util.Date;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

package com.microsoft.azure.v2.credentials;

import com.microsoft.azure.management.apigeneration.Beta;
import com.microsoft.azure.v2.serializer.AzureJacksonAdapter;
import com.microsoft.rest.v2.annotations.Beta;

import java.io.BufferedReader;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import com.google.common.escape.Escaper;
import com.google.common.net.UrlEscapers;
import com.microsoft.aad.adal4j.AuthenticationResult;
import com.microsoft.azure.management.apigeneration.Beta;
import com.microsoft.rest.v2.RestProxy;
import com.microsoft.rest.v2.annotations.Beta;
import com.microsoft.rest.v2.annotations.BodyParam;
import com.microsoft.rest.v2.annotations.ExpectedResponses;
import com.microsoft.rest.v2.annotations.Host;
Expand Down
4 changes: 0 additions & 4 deletions client-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-annotations</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/

package com.microsoft.rest.v2.annotations;

import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.ElementType.CONSTRUCTOR;

import java.lang.annotation.Documented;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Beta annotation.
*/
@Documented
@Retention(RetentionPolicy.CLASS)
@Target({ TYPE, METHOD, PARAMETER, CONSTRUCTOR })
@Inherited
/**
* Indicates functionality that is in preview and as such is subject to change in non-backwards compatible ways in future releases,
* including removal, regardless of any compatibility expectations set by the containing library version.
*
* Examples:
*
* {@literal @}Beta
* {@literal @}Beta(since="v1.0.0")
* {@literal @}Beta(since="v1.2.0", reason="the feature is in preview")
* {@literal @}Beta("introducing Foo which eventually replaces Bar")
*/
public @interface Beta {
/**
* @return the free-form value for the annotation (used if details cannot be provided using since and reason attributes).
*/
String value() default "";

/**
* @return the version number indicating when the annotated target was first introduced to the library as in beta.
*/
String since() default "";

/**
* @return the reason for annotating the target as beta.
*/
String reason() default "";

/**
* @return the warning message.
*/
String warningText() default "This functionality is in preview and as such is subject to change in non-backwards compatible ways in future releases, including removal, regardless of any compatibility expectations set by the containing library version.";
}
5 changes: 0 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,6 @@
<artifactId>slf4j-api</artifactId>
<version>1.7.22</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-annotations</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-buffer</artifactId>
Expand Down

0 comments on commit fef3f0e

Please sign in to comment.