Skip to content

Commit 6e2f3b5

Browse files
committed
misc: deprecatedUntilVersion annotation
1 parent f557442 commit 6e2f3b5

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

runtime/runtime-core/api/runtime-core.api

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ public class aws/smithy/kotlin/runtime/ClientException : aws/smithy/kotlin/runti
1515
public fun <init> (Ljava/lang/Throwable;)V
1616
}
1717

18+
public abstract interface annotation class aws/smithy/kotlin/runtime/DeprecatedUntilVersion : java/lang/annotation/Annotation {
19+
public abstract fun major ()I
20+
public abstract fun minor ()I
21+
}
22+
1823
public class aws/smithy/kotlin/runtime/ErrorMetadata {
1924
public static final field Companion Laws/smithy/kotlin/runtime/ErrorMetadata$Companion;
2025
public fun <init> ()V

runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/Annotations.kt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,16 @@ public annotation class ExperimentalApi
5858
*/
5959
@DslMarker
6060
public annotation class SdkDsl
61+
62+
/**
63+
* Indicates that the annotated API is deprecated and scheduled for removal in an upcoming minor version.
64+
* Any code using this API should migrate to the suggested replacement as soon as possible.
65+
*/
66+
@RequiresOptIn(
67+
message = "This API is deprecated and will be removed in an upcoming minor version.",
68+
level = RequiresOptIn.Level.WARNING,
69+
)
70+
public annotation class DeprecatedUntilVersion(
71+
val major: Int,
72+
val minor: Int,
73+
)

0 commit comments

Comments
 (0)